Bug 349521 - Valgrind misses some line numbers in output on OS X 10.11
Summary: Valgrind misses some line numbers in output on OS X 10.11
Status: RESOLVED FIXED
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (show other bugs)
Version: 3.10 SVN
Platform: macOS (DMG) macOS
: NOR normal
Target Milestone: ---
Assignee: Rhys Kidd
URL:
Keywords:
Depends on:
Blocks: 348909
  Show dependency treegraph
 
Reported: 2015-06-23 09:36 UTC by Rhys Kidd
Modified: 2023-12-29 09:10 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Comparison of Dwarf3-based .dSYM files (1.25 KB, application/x-gzip)
2015-06-23 09:45 UTC, Rhys Kidd
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rhys Kidd 2015-06-23 09:36:06 UTC
On OS X Valgrind at times is unable to correctly reference line numbers within a source code file in error reports. This manifests in a number of regression tests failing for this reason.

Reproducible: Always

Steps to Reproduce:
1. $ make check
2. $ perl tests/vg_regtest memcheck/tests/darwin/deep_badparam memcheck/tests/errs1 memcheck/tests/strchr memcheck/tests/xml1

Actual Results:  
Each of the above tests fails on OS X 10.11 (El Capitan) using the latest pre-release of the Clang-based compiler.

Expected Results:  
All tests pass, per OS X 10.10.
Comment 1 Rhys Kidd 2015-06-23 09:45:35 UTC
Created attachment 93298 [details]
Comparison of Dwarf3-based .dSYM files

Attachment includes outputs of dwarfdump on the .dSYM files for one of Valgrind's regression tests.

OS X 10.11: Apple LLVM version 7.0.0 (clang-700.0.53)
OS X 10.10: Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)

A difference between the two is the replacement of AT_upper_bound with AT_count when describing a char array.
Comment 2 Paul Floyd 2023-12-29 09:10:51 UTC
On macOS 10.13 I get

 perl tests/vg_regtest memcheck/tests/darwin/deep_badparam memcheck/tests/errs1 memcheck/tests/strchr memcheck/tests/xml1
deep_badparam:   valgrind   -q ./deep_badparam 
errs1:           valgrind   -q ./errs1 
strchr:          valgrind   -q ./strchr 
xml1:            valgrind   --xml=yes --xml-fd=2 --log-file=/dev/null --keep-stacktraces=alloc-then-free ./xml1 
*** xml1 failed (stderr) ***
== 4 tests, 1 stderr failure, 0 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures ==
memcheck/tests/xml1

xml1 is failing because of a leak.

macOS 10.13 High Sierra is the oldest version that I'm using (which is already pretty old) so I'm not going to check on 10.11 or 10.12.