This code causes a segfault:
.sub test :main
get_results '(0)'
.end
From my reading of src/ops/core.ops, this is invalid syntax. From my reading
of IMCC's parser, there's no easy way to catch this. A correct invocation is
more likely:
.sub test :main
get_results '(0)', P1
# or
get_results '()'
.end
It's possible to add a null guard in compilers/imcc/pbc.c:1120, but I think
that's the wrong fix; the parser should warn on the error here.
-- c
# New Ticket Created by chromatic
# Please include the string: [perl #41771]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=41771 >
This code causes a segfault:
.sub test :main
get_results '(0)'
.end
From my reading of src/ops/core.ops, this is invalid syntax . . .
It's possible to add a null guard in compilers/imcc/pbc.c:1120, but I think
that's the wrong fix; the parser should warn on the error here.
-- c
This is the same issue as "#41097: Segfault in malformed get_results".
Detecting this as a syntax error is ideal, but it occurs to me that it
would also be a good idea to guard against malformed bytecode, lest it
become a security issue down the road.
-- Bob Rogers
http://rgrjr.dyndns.org/