Mercury Bugs - mercury
View Issue Details
0000464mercuryBugpublic2018-07-25 15:122018-08-19 17:02
Reporterwangp 
Assigned Towangp 
PrioritynormalSeverityminorReproducibilityN/A
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000464: MR_fatal_error should not read errno
DescriptionMR_fatal_error prints "Error = %d" if errno happens to be non-zero when it is called, leading to potential confusion if the value in errno has nothing to do with the reason MR_fatal_error was called, and spurious test failures.

There are too many calls to MR_fatal_error for me to go through right now. My guess is that the majority of calls to MR_fatal_error do not follow a function call that returned an error and set errno.
TagsNo tags attached.
Attached Files

Notes
(0001003)
zs   
2018-07-27 14:07   
The obvious solution is to add an enum arg to MR_fatal_error, with two
values: PRINT_ERRNO_MSG and DONT_PRINT_ERRNO_MSG, and fix
all the C compiler errors that result by specifying one or the other
at all the complained-about call sites.

Issue History
2018-07-25 15:12wangpNew Issue
2018-07-27 14:07zsNote Added: 0001003
2018-08-19 17:02wangpAssigned To => wangp
2018-08-19 17:02wangpStatusnew => resolved
2018-08-19 17:02wangpResolutionopen => fixed