Closed Bug 1925623 Opened 21 days ago Closed 22 hours ago

warning: the object size sanitizer has no effect at -O0, but is explicitly enabled

Categories

(Firefox Build System :: Toolchains, defect)

defect

Tracking

(firefox-esr128 unaffected, firefox131 wontfix, firefox132 wontfix, firefox133 wontfix, firefox134 fixed)

RESOLVED FIXED
134 Branch
Tracking Status
firefox-esr128 --- unaffected
firefox131 --- wontfix
firefox132 --- wontfix
firefox133 --- wontfix
firefox134 --- fixed

People

(Reporter: truber, Assigned: sergesanspaille)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression)

Attachments

(1 file, 1 obsolete file)

Building with --enable-undefined-sanitizer and --enable-optimize="-O0" results in warnings on every call to clang or clang++.

For example:

 0:18.38 accessible/generic                                                                                                                                                                                                                                                      
 0:18.39 clang: warning: the object size sanitizer has no effect at -O0, but is explicitly enabled: -fsanitize=bool,bounds,enum,function,integer-divide-by-zero,object-size,pointer-overflow,return,vla-bound [-Winvalid-command-line-argument]                                  
 0:18.39 clang: warning: the object size sanitizer has no effect at -O0, but is explicitly enabled: -fsanitize=bool,bounds,enum,function,integer-divide-by-zero,object-size,pointer-overflow,return,vla-bound [-Winvalid-command-line-argument]                                  
 0:18.40 clang: warning: the object size sanitizer has no effect at -O0, but is explicitly enabled: -fsanitize=bool,bounds,enum,function,integer-divide-by-zero,object-size,pointer-overflow,return,vla-bound [-Winvalid-command-line-argument]                                  
 0:18.40 clang: warning: the object size sanitizer has no effect at -O0, but is explicitly enabled: -fsanitize=bool,bounds,enum,function,integer-divide-by-zero,object-size,pointer-overflow,return,vla-bound [-Winvalid-command-line-argument]                                  
 0:18.42 clang: warning: the object size sanitizer has no effect at -O0, but is explicitly enabled: -fsanitize=bool,bounds,enum,function,integer-divide-by-zero,object-size,pointer-overflow,return,vla-bound [-Winvalid-command-line-argument]                                  
 0:18.42 accessible/html                                                                                                                                                                                                                                                         
 0:18.43 clang: warning: the object size sanitizer has no effect at -O0, but is explicitly enabled: -fsanitize=bool,bounds,enum,function,integer-divide-by-zero,object-size,pointer-overflow,return,vla-bound [-Winvalid-command-line-argument]                                  
 0:18.45 clang++: warning: the object size sanitizer has no effect at -O0, but is explicitly enabled: -fsanitize=bool,bounds,enum,function,integer-divide-by-zero,object-size,pointer-overflow,return,vla-bound [-Winvalid-command-line-argument]                                
 0:18.46 clang++: warning: the object size sanitizer has no effect at -O0, but is explicitly enabled: -fsanitize=bool,bounds,enum,function,integer-divide-by-zero,object-size,pointer-overflow,return,vla-bound [-Winvalid-command-line-argument]                                
 0:18.47 clang: warning: the object size sanitizer has no effect at -O0, but is explicitly enabled: -fsanitize=bool,bounds,enum,function,integer-divide-by-zero,object-size,pointer-overflow,return,vla-bound [-Winvalid-command-line-argument]                                  
 0:18.47 clang: warning: the object size sanitizer has no effect at -O0, but is explicitly enabled: -fsanitize=bool,bounds,enum,function,integer-divide-by-zero,object-size,pointer-overflow,return,vla-bound [-Winvalid-command-line-argument]                                  
 0:18.48 clang: warning: the object size sanitizer has no effect at -O0, but is explicitly enabled: -fsanitize=bool,bounds,enum,function,integer-divide-by-zero,object-size,pointer-overflow,return,vla-bound [-Winvalid-command-line-argument]                                  
 0:18.49 clang: warning: the object size sanitizer has no effect at -O0, but is explicitly enabled: -fsanitize=bool,bounds,enum,function,integer-divide-by-zero,object-size,pointer-overflow,return,vla-bound [-Winvalid-command-line-argument]                                  
 0:18.50 accessible/ipc                                                                                                                                                                                                                                                          
 0:18.51 clang: warning: the object size sanitizer has no effect at -O0, but is explicitly enabled: -fsanitize=bool,bounds,enum,function,integer-divide-by-zero,object-size,pointer-overflow,return,vla-bound [-Winvalid-command-line-argument]                                  
 0:18.53 clang: warning: the object size sanitizer has no effect at -O0, but is explicitly enabled: -fsanitize=bool,bounds,enum,function,integer-divide-by-zero,object-size,pointer-overflow,return,vla-bound [-Winvalid-command-line-argument]                                  
 0:18.53 clang: warning: the object size sanitizer has no effect at -O0, but is explicitly enabled: -fsanitize=bool,bounds,enum,function,integer-divide-by-zero,object-size,pointer-overflow,return,vla-bound [-Winvalid-command-line-argument]                                  
 0:18.54 clang: warning: the object size sanitizer has no effect at -O0, but is explicitly enabled: -fsanitize=bool,bounds,enum,function,integer-divide-by-zero,object-size,pointer-overflow,return,vla-bound [-Winvalid-command-line-argument]                                  
 0:18.54 clang: warning: the object size sanitizer has no effect at -O0, but is explicitly enabled: -fsanitize=bool,bounds,enum,function,integer-divide-by-zero,object-size,pointer-overflow,return,vla-bound [-Winvalid-command-line-argument]                                  
 0:18.55 clang: warning: the object size sanitizer has no effect at -O0, but is explicitly enabled: -fsanitize=bool,bounds,enum,function,integer-divide-by-zero,object-size,pointer-overflow,return,vla-bound [-Winvalid-command-line-argument]                                  
 0:18.57 clang: warning: the object size sanitizer has no effect at -O0, but is explicitly enabled: -fsanitize=bool,bounds,enum,function,integer-divide-by-zero,object-size,pointer-overflow,return,vla-bound [-Winvalid-command-line-argument]                                  
 0:18.57 clang++: warning: the object size sanitizer has no effect at -O0, but is explicitly enabled: -fsanitize=bool,bounds,enum,function,integer-divide-by-zero,object-size,pointer-overflow,return,vla-bound [-Winvalid-command-line-argument]                                

We should disable the object-size sanitizer when --enable-optimize=-O0 is used. This is commonly used for local builds instead of --disable-optimize because we want -gline-tables-only, which the in-tree configs add to --enable-optimize.

Type: enhancement → defect
Type: enhancement → defect

Set release status flags based on info from the regressing bug 1906824

:sergesanspaille, since you are the author of the regressor, bug 1906824, could you take a look? Also, could you set the severity field?

For more information, please visit BugBot documentation.

This works as intended:

ac_add_options --disable-optimize
ac_add_options --enable-debug-symbols="-gline-tables-only"

so maybe the solution is to update the in-tree sanitizer build configs.

Assignee: nobody → sguelton
Status: NEW → ASSIGNED

(In reply to Jesse Schwartzentruber (:truber) from comment #2)

This works as intended:

ac_add_options --disable-optimize
ac_add_options --enable-debug-symbols="-gline-tables-only"

so maybe the solution is to update the in-tree sanitizer build configs.

I actually have a one year old patch in my local tree that does that... I'll attach it to a new bug.

(In reply to Mike Hommey [:glandium] from comment #4)

(In reply to Jesse Schwartzentruber (:truber) from comment #2)

This works as intended:

ac_add_options --disable-optimize
ac_add_options --enable-debug-symbols="-gline-tables-only"

so maybe the solution is to update the in-tree sanitizer build configs.

I actually have a one year old patch in my local tree that does that... I'll attach it to a new bug.

bug 1927983 for mozconfigs and bug 1927982 for sanitizer docs.

Attachment #9433591 - Attachment is obsolete: true
Flags: needinfo?(sguelton)
Pushed by sguelton@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/811cf67709f3 Die on configure if optimization flags actually don't trigger any optimization r=glandium

The severity field is not set for this bug.
:glandium, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(mh+mozilla)
Status: ASSIGNED → RESOLVED
Closed: 22 hours ago
Resolution: --- → FIXED
Target Milestone: --- → 134 Branch
Flags: needinfo?(mh+mozilla)

The patch landed in nightly and beta is affected.
:sergesanspaille, is this bug important enough to require an uplift?

  • If yes, please nominate the patch for beta approval.
  • If no, please set status-firefox133 to wontfix.

For more information, please visit BugBot documentation.

Flags: needinfo?(sguelton)
Flags: needinfo?(sguelton)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: