Opened 12 years ago

Closed 12 years ago

#498 closed defect (fixed)

Logger crashes in fclose()

Reported by: Jakub Jermář Owned by:
Priority: major Milestone: 0.6.0
Component: helenos/srv/logger Version: mainline
Keywords: Cc:
Blocker for: Depends on:
See also:

Description

As of mainline,1685, logger crashes in the following code path:

fclose() [stream is NULL]
log_release()
unregister_logs()
logger_connection_handler_writer()

Change History (2)

comment:1 by Jakub Jermář, 12 years ago

Component: helenos/unspecifiedhelenos/srv/logger

comment:2 by Vojtech Horky, 12 years ago

Resolution: fixed
Status: newclosed

Fixed in mainline,1686.

For the record: the bug can be reproduced by running /app/tester on any test except the logger ones (e.g. tester softfloat1).

The cause of the fault was that logger opens the log file (e. g. /log/tester) only when it is really needed – i. e. on first write to that file. Thus, if some application initializes logging but logs nothing (such as the softfloat1 test), on application exit the logger was closing NULL file stream.

Note: See TracTickets for help on using tickets.