<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>349128</bug_id>
          
          <creation_ts>2015-06-14 03:13:11 +0000</creation_ts>
          <short_desc>Access not within mapped region in _pthread_find_thread (OS X 10.11)</short_desc>
          <delta_ts>2025-12-19 06:09:24 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>6</classification_id>
          <classification>Developer tools</classification>
          <product>valgrind</product>
          <component>general</component>
          <version>3.10 SVN</version>
          <rep_platform>macOS (DMG)</rep_platform>
          <op_sys>macOS</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>348909</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Rhys Kidd">rhyskidd</reporter>
          <assigned_to name="Paul Floyd">pjfloyd</assigned_to>
          <cc>halilsen</cc>
    
    <cc>jkempinger</cc>
    
    <cc>kevin.dixon</cc>
    
    <cc>louis.brunner.fr</cc>
    
    <cc>michel</cc>
    
    <cc>Per.Mildner</cc>
    
    <cc>philippe.waroquiers</cc>
    
    <cc>pjfloyd</cc>
    
    <cc>ptaudou</cc>
    
    <cc>tamird</cc>
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>50</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1525851</commentid>
    <comment_count>0</comment_count>
    <who name="Rhys Kidd">rhyskidd</who>
    <bug_when>2015-06-14 03:13:11 +0000</bug_when>
    <thetext>Process terminating with default action of signal 11 (SIGSEGV)
  Access not within mapped region at address 0x70000324543E
    at 0x10042E42A: _pthread_find_thread (in /usr/lib/system/libsystem_pthread.dylib)
    by 0x100430CE8: _pthread_lookup_thread (in /usr/lib/system/libsystem_pthread.dylib)
    by 0x100430AC0: pthread_join (in /usr/lib/system/libsystem_pthread.dylib)
    by 0x100000C75: child_fn_1 (threadname.c:51)
    by 0x10042FCC2: _pthread_body (in /usr/lib/system/libsystem_pthread.dylib)
    by 0x10042FC3F: _pthread_start (in /usr/lib/system/libsystem_pthread.dylib)
    by 0x10042CDA4: thread_start (in /usr/lib/system/libsystem_pthread.dylib)
  If you believe this happened as a result of a stack
  overflow in your program&apos;s main thread (unlikely but
  possible), you can try to increase the size of the
  main thread stack using the --main-stacksize= flag.
  The main thread stack size used in this run was 8388608.
:0:schedule VG_(sema_down): read returned -4

Memcheck: mc_leakcheck.c:1045 (void lc_scan_memory(Addr, SizeT, Bool, Int, Int, Addr, SizeT)): Assertion &apos;bad_scanned_addr &gt;= VG_ROUNDUP(start, sizeof(Addr))&apos; failed.

Reproducible: Always

Steps to Reproduce:
1. Apply preliminary patch set from bz#348909
2. $ ./autogen.sh
3. $ ./configure
4. $ make
5. $ make check
6. $ perl tests/vg_regtest memcheck/tests/err_disable3 memcheck/tests/threadname memcheck/tests/threadname_xml

Actual Results:  
$ perl tests/vg_regtest memcheck/tests/err_disable3 memcheck/tests/threadname memcheck/tests/threadname_xml
err_disable3:    valgrind   -q ./err_disable3 
sh: line 1: 15976 Segmentation fault: 11  VALGRIND_LIB=/Users/usera/Coding/valgrind/.in_place VALGRIND_LIB_INNER=/Users/usera/Coding/valgrind/.in_place /Users/usera/Coding/valgrind/./coregrind/valgrind --command-line-only=yes --memcheck:leak-check=no --tool=memcheck -q ./err_disable3 &gt; err_disable3.stdout.out 2&gt; err_disable3.stderr.out
*** err_disable3 failed (stderr) ***
threadname:      valgrind   -q ./threadname 
sh: line 1: 16020 Killed: 9               VALGRIND_LIB=/Users/usera/Coding/valgrind/.in_place VALGRIND_LIB_INNER=/Users/usera/Coding/valgrind/.in_place /Users/usera/Coding/valgrind/./coregrind/valgrind --command-line-only=yes --memcheck:leak-check=no --tool=memcheck -q ./threadname &gt; threadname.stdout.out 2&gt; threadname.stderr.out
*** threadname failed (stderr) ***
threadname_xml:  valgrind   --xml=yes --xml-fd=2 --log-file=/dev/null ./threadname 
*** threadname_xml failed (stderr) ***

== 3 tests, 3 stderr failures, 0 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures ==
memcheck/tests/err_disable3              (stderr)
memcheck/tests/threadname                (stderr)
memcheck/tests/threadname_xml            (stderr)

Expected Results:  
No regression test failures.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1555553</commentid>
    <comment_count>1</comment_count>
    <who name="Tamir Duberstein">tamird</who>
    <bug_when>2015-11-08 15:22:01 +0000</bug_when>
    <thetext>I&apos;m able to reproduce this on valgrind-3.12.0.SVN (r15723).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1597073</commentid>
    <comment_count>2</comment_count>
    <who name="Rhys Kidd">rhyskidd</who>
    <bug_when>2016-05-27 20:20:38 +0000</bug_when>
    <thetext>*** Bug 363123 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1610823</commentid>
    <comment_count>3</comment_count>
    <who name="Halil Sen">halilsen</who>
    <bug_when>2016-07-27 09:52:49 +0000</bug_when>
    <thetext>Is this a valgrind bug or a bug of pthread library on os x? This webpage (https://bytecoin.org/blog/pthread-bug-osx/) explains it as if it is an apple bug.

Nevertheless, do you have any time estimation for us to be able to use valgrind with a multithreaded code on os x?

Thank you.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1772920</commentid>
    <comment_count>4</comment_count>
    <who name="Per Mildner">Per.Mildner</who>
    <bug_when>2018-08-20 06:37:57 +0000</bug_when>
    <thetext>That link seems to be dead now. Archived link: https://web.archive.org/web/20160304041047/https://bytecoin.org/blog/pthread-bug-osx</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2277077</commentid>
    <comment_count>5</comment_count>
    <who name="Paul Floyd">pjfloyd</who>
    <bug_when>2023-12-29 09:43:58 +0000</bug_when>
    <thetext>I&apos;d say a Valgrind issue. Still happening on macOS 10.13.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2477849</commentid>
    <comment_count>6</comment_count>
    <who name="Paul Floyd">pjfloyd</who>
    <bug_when>2025-12-18 09:36:03 +0000</bug_when>
    <thetext>I need to check to see if this is still an issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2478059</commentid>
    <comment_count>7</comment_count>
    <who name="Paul Floyd">pjfloyd</who>
    <bug_when>2025-12-19 06:09:24 +0000</bug_when>
    <thetext>On 10.15

tests/vg_regtest memcheck/tests/err_disable3 memcheck/tests/threadname memcheck/tests/threadname_xml
err_disable3:    valgrind   -q ./err_disable3 
threadname:      valgrind   -q ./threadname 
threadname_xml:  valgrind   --xml=yes --xml-fd=2 --log-file=/dev/null ./threadname 

== 3 tests, 0 stderr failures, 0 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures ==

Closing this as fixed.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>