New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ocamllex and ocamlyacc should check that there are balanced parentheses in code blocks #7455
Comments
Comment author: @dra27 Out of curiosity, do you have a nefarious example which actually compiles? |
Comment author: dobenour I just attached conflict.mly. When processed with ocamlyacc, it produces a file conflict.ml which segfaults when run. |
Comment author: @Octachron Note: the above PR has been merged in 4.06 trunk and fixes the issue on the ocamlyacc side, but not the ocamllex side. |
This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc. |
This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc. |
It looks like no one is willing to put the work to solve this issue (for ocamllex; the ocamlyacc part has been solved). Maybe it's okay to officially give up and close it for good? |
This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc. |
This checks that parentheses and curly braces are properly balenced in ocamllex actions. Fixes ocaml#7455 for ocamllex (it was already fixed for ocamlyacc).
This checks that parentheses and curly braces are properly balenced in ocamllex actions. Fixes ocaml#7455 for ocamllex (it was already fixed for ocamlyacc).
This checks that parentheses and curly braces are properly balenced in ocamllex actions. Fixes ocaml#7455 for ocamllex (it was already fixed for ocamlyacc).
This checks that parentheses and curly braces are properly balenced in ocamllex actions. It also significantly refactors ocamllex’s lexer to pass state using function arguments instead of mutable global variables. Fixes ocaml#7455 for ocamllex (it was already fixed for ocamlyacc).
This checks that parentheses and curly braces are properly balenced in ocamllex actions. It also significantly refactors ocamllex’s lexer to pass state using function arguments instead of mutable global variables. Fixes ocaml#7455 for ocamllex (it was already fixed for ocamlyacc).
This checks that parentheses and curly braces are properly balenced in ocamllex actions. It also significantly refactors ocamllex’s lexer to pass state using function arguments instead of mutable global variables. Fixes ocaml#7455 for ocamllex (it was already fixed for ocamlyacc).
This checks that parentheses and curly braces are properly balanced in ocamllex actions. It also significantly refactors ocamllex’s lexer to pass state using function arguments instead of mutable global variables. Fixes #7455 for ocamllex (it was already fixed for ocamlyacc).
Original bug ID: 7455
Reporter: dobenour
Status: acknowledged (set by @xavierleroy on 2017-02-19T16:59:08Z)
Resolution: open
Priority: normal
Severity: minor
Version: 4.04.0
Target version: 4.07.0+dev/beta2/rc1/rc2
Category: tools (ocaml{lex,yacc,dep,debug,...})
Monitored by: bikal
Bug description
ocamllex and ocamlyacc both fail to check for balanced parentheses in code blocks. This allows for invalid OCaml code to be generated. In the case of ocamlyacc, it might be possible to break the type system due to the use of Obj in the generated code, though I don't think so.
File attachments
The text was updated successfully, but these errors were encountered: