The Persistence of Vision Raytracer (POV-Ray).
This is the legacy Bug Tracking System for the POV-Ray project. Bugs listed here are being migrated to our github issue tracker. Please refer to that for new reports or updates to existing ones on this system.
Opened by Pietro Bernardi - 2016-11-06
Last edited by William F Pokorny - 2016-11-25
FS#336 - #fopen w/o OPEN_TYPE crash povray (segfault)
#fopen directive w/o OPEN_TYPE (yeah, I forgot it, some other languages have ‘read’ as default value)
expected behavior:
Parse error msg “line XXX, OPEN_TYPE missing in #fopen directive”, then stop.
observed behavior:
crash - Segfault err (core dump) in Parsing stage
minimal working example attached
Friday, 25 November 2016, 16:07 GMT
Reason for closing: Fixed
Additional comments about closing:
Fixed with git commit d62de5c was Christoph Lipka, Sun Nov 6 15:58:06 2016 +0100, message: Fix FlySpray task 336 ( http://bugs.povray.org/task/336).
My testing confirms and closing as of
github pre-release Nov 25, 2016.
Solving this issue is only semi-trivial, as "#read" may be perfectly valid smack within a "#fopen" statement, as exemplified by the following code:
Problems arise if a "#read", "#write" or (untested) "#fclose" statement thus embedded in a "#fopen" statement (or after an incomplete "#fopen" statement) references the same file handle, as in this case the file handle will not have been properly initialized yet.
I'll add a safeguard for such cases so that you get a graceful error rather than a hard crash.
Should be fixed with commit d62de5c.