Ticket #737 (closed bug: fixed)

Opened 5 years ago

Last modified 5 years ago

imcc segfault when assigning to undefined retval

Reported by: cotto Owned by:
Priority: normal Milestone:
Component: imcc Version: trunk
Severity: medium Keywords:
Cc: Language:
Patch status: Platform: all

Description

The following snipped of code kills imcc with a segfault.

.sub main
    (foo) = baz()
.end

This obviously shouldn't compile, but a more graceful failure is probably appropriate. The following code works as expected, so I'd guess this has to do with foo not being defined.

.sub main
    .local pmc foo
    (foo) = baz()
.end

.sub baz
    .return(1)
.end

Change History

Changed 5 years ago by NotFound

Fixed segfault in r39725 by adding a check in pcc.c:expand_pcc_sub_call This is not the better solution, but the check here avoid now this segfault, and probably other unexpected situations.

Changed 5 years ago by coke

  • status changed from new to closed
  • resolution set to fixed

NotFound++ fixed the segfault 3 months ago.

Note: See TracTickets for help on using tickets.