Opened 15 years ago

Closed 15 years ago

Last modified 14 years ago

#282 closed defect (fixed)

Infinite recursion when crashlog.txt can't be written

Reported by: Philip Taylor Owned by: Jan Wassenberg
Priority: Should Have Milestone:
Component: Core engine Keywords:
Cc: Patch:

Description

In debug.cpp, debug_WriteCrashlog tries to open crashlog.txt for writing. If it fails (e.g. it doesn't have write permission to that directory), it resets isBusy and then does WARN_RETURN, which calls debug_DisplayError, which calls debug_WriteCrashlog, and isBusy is false so it loops forever.

See http://ruby.pastebin.com/m53d88e4a for an example of this.

Change History (4)

comment:1 by Jan Wassenberg, 15 years ago

Resolution: fixed
Status: newclosed

Fixed via tri-state bool :)

comment:2 by Philip Taylor, 15 years ago

In r7053, I see you use volatile and cpu_CAS. Is that meant to be to make it thread-safe? If so, the static variable initialisation is not thread-safe and could break everything.

(Hmm, this ticket is an inappropriate place for this comment - maybe we need a better system for this kind of thing.)

comment:3 by Jan Wassenberg, 15 years ago

Good point. Have fixed that, too.

comment:4 by (none), 14 years ago

Milestone: Open Source Release

Milestone Open Source Release deleted

Note: See TracTickets for help on using tickets.