Open
Bug 936279
Opened 11 years ago
Updated 2 years ago
NS_RUNTIMEABORT puts file paths into release builds
Categories
(Core :: XPCOM, defect)
Tracking
()
NEW
People
(Reporter: away, Unassigned)
References
Details
On currently shipping builds I see over 400 file paths in xul. I believe the vast majority of these come from NS_RUNTIMEABORT. They all start with e:/builds/moz2_slave/rel-m-rel-w32_bld-000000000000/build/ (58 characters) and let's say there's an average of 50% more for the actual source path, and that adds up to 35KB.
Most of the assertion macros compile down to nothing in opt builds, but NS_RUNTIMEABORT is deliberately left enabled. Does it really need to use __FILE__ outside of debug though?
Maybe having file names is valuable enough for investigations to be worth the cost. Or maybe it was just an oversight. I don't know.
Comment 1•11 years ago
|
||
I'd think that the stack in the crash report would be enough.
And there's probably another dozen or two KB in the abort messages, though perhaps those are more valuable.
Comment 3•11 years ago
|
||
The stack in the crash report is not always reliable, especially in low-memory situations, and the abort message including the file name is sometimes quite valuable. But really all we need is the leafname, not the full path.
Comment 4•11 years ago
|
||
(In reply to comment #3)
> The stack in the crash report is not always reliable, especially in low-memory
> situations, and the abort message including the file name is sometimes quite
> valuable. But really all we need is the leafname, not the full path.
Well, all that we have at our disposal is __FILE__.
Comment 5•11 years ago
|
||
(In reply to :Ehsan Akhgari (needinfo? me!) from comment #4)
> (In reply to comment #3)
> > The stack in the crash report is not always reliable, especially in low-memory
> > situations, and the abort message including the file name is sometimes quite
> > valuable. But really all we need is the leafname, not the full path.
>
> Well, all that we have at our disposal is __FILE__.
not really, we could have the build system pass the compiler -DMOZ_FILE=$(basename $CPP_FILE) and then use MOZ_FILE instead of __FILE__ in places like this.
(seems relevent to froydnj's interests so cc += him)
Comment 6•11 years ago
|
||
(In reply to comment #5)
> (In reply to :Ehsan Akhgari (needinfo? me!) from comment #4)
> > (In reply to comment #3)
> > > The stack in the crash report is not always reliable, especially in low-memory
> > > situations, and the abort message including the file name is sometimes quite
> > > valuable. But really all we need is the leafname, not the full path.
> >
> > Well, all that we have at our disposal is __FILE__.
>
> not really, we could have the build system pass the compiler
> -DMOZ_FILE=$(basename $CPP_FILE) and then use MOZ_FILE instead of __FILE__ in
> places like this.
That will break in a number of cases, such as unfiied builds, code in headers, etc.
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•