Ticket #886 (closed defect: fixed)

Opened 6 years ago

Last modified 6 years ago

[PATCH] Segmentation fault triggered from DEBUG_BLOCK_PRINT in block-raw.c because logfile is NULL

Reported by: zmedico@… Owned by: balrogg@…
Priority: high Milestone:
Component: qemu-neo1973 Version: current svn head
Severity: normal Keywords:
Cc: buglog@… Blocked By:
Blocking: Estimated Completion (week):
HasPatchForReview: PatchReviewResult:
Reproducible:

Description

This problem appeared when upstream changes were pulled in revision 2981. This
triggers the following segmentation fault when running flash.sh:

openmoko/flash.sh: line 88: 1421 Segmentation fault (core dumped) $qemu
-mtdblock "$script_dir/$flash_base" -kernel "$script_dir/$1" -serial stdio
-nographic -usb -monitor null 0<&0

I used gdb to generate a backtrace and found that the segmentation fault was due
to the DEBUG_BLOCK_PRINT macro in block-raw.c being called while logfile was NULL.

Attachments

block-raw.c.diff (525 bytes) - added by zmedico@… 6 years ago.
make DEBUG_BLOCK_PRINT check if logfile is NULL

Change History

Changed 6 years ago by zmedico@…

make DEBUG_BLOCK_PRINT check if logfile is NULL

comment:1 Changed 6 years ago by balrogg@…

  • Owner changed from dodji@… to balrogg@…

comment:2 Changed 6 years ago by balrogg@…

  • Status changed from new to assigned

comment:3 Changed 6 years ago by balrogg@…

  • Status changed from assigned to closed
  • Resolution set to fixed

Thanks, should be okay now (r3019). I committed a similar change upstream.

Note: See TracTickets for help on using tickets.