atabac / python-on-a-chip

Automatically exported from code.google.com/p/python-on-a-chip
Other
0 stars 0 forks source link

Unchecked return values causes a crash #114

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Details to follow as code is committed.

Original issue reported on code.google.com by bjones460@gmail.com on 3 Aug 2010 at 4:44

GoogleCodeExporter commented 9 years ago
r547:
- Merged in trunk

Original comment by bjones460@gmail.com on 3 Aug 2010 at 6:31

GoogleCodeExporter commented 9 years ago
r548:
- Merged in trunk
- Added a failing test: should report out-of-memory, but crashes

Original comment by bjones460@gmail.com on 3 Aug 2010 at 6:59

GoogleCodeExporter commented 9 years ago
Lines 48-51 of tuple.c use memory before check it's return value.

    retval = tuple_new(n, r_ptuple);
    ((pPmTuple_t)*r_ptuple)->length = 0;
    PM_RETURN_IF_ERROR(retval);

The second and third lines should be reversed.

Original comment by bjones460@gmail.com on 4 Aug 2010 at 4:16

GoogleCodeExporter commented 9 years ago
r554:
- Committed change above
- Merged in branch
- All tests pass, except t114. Need to change the expected exit code.

Original comment by bjones460@gmail.com on 4 Aug 2010 at 4:31

GoogleCodeExporter commented 9 years ago
r555:
- t114.c exit code fixed, all tests pass.

Original comment by bjones460@gmail.com on 4 Aug 2010 at 4:32

GoogleCodeExporter commented 9 years ago
r556:
- t114.c was invoking t108 (thanks to Dean for spotting this).
- Return code logic backwards
- All tests pass

Original comment by bjones460@gmail.com on 4 Aug 2010 at 7:29

GoogleCodeExporter commented 9 years ago
r557:
- Mainlined changes. All tests pass.

Original comment by bjones460@gmail.com on 4 Aug 2010 at 7:39

GoogleCodeExporter commented 9 years ago
r560
- Made src/tests/system/t114.py have Unix EOLs.

Original comment by dwhall...@gmail.com on 5 Aug 2010 at 2:08