mitex-rs / mitex

LaTeX support for Typst, powered by Rust and WASM. https://mitex-rs.github.io/mitex/

Home Page:https://mitex-rs.github.io/mitex/tools/underleaf.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

unreachable on certain input

Enter-tainer opened this issue · comments

\left\/\frac 1 2\right)

Screenshot_2024-01-11-18-23-47-543_com.microsoft.emmx.jpg

maybe use fuzzer to test parser & lexer

I've tried using afl.rs to fuzz risingwave before. I can set up simliar thing when I leave work

I prefer libfuzzer-sys, which uses llvm and much more lightweight.

actually afl is easier because it works in stable rust, while libfuzzer requires nightly

minimized using afl:

\left\0
\end{}

crashes mitex

more comment: Reaching a panic-free MiTeX has a slightly lower priority than producing a design of converting complex environments in text mode. This is for enrich corpora of typst documents. For that goals with higher priority, for example, we would like to convert a large set of TeX papers to typst.

Therefore, the underlying parser and converter may still change a lot. To do that, we want to collect frequently used commands and summarize a closest model to typst elements:

agree. most panics are from broken latex input. they seem not happen in valid inputs

close by #113 and 22e87fb