[valgrind] [Bug 416436] Unrecognised instruction at address 0x1006037BD (__pthread_init.cold.2) macOS 10.15

2026-03-09 Thread Paul Floyd
https://bugs.kde.org/show_bug.cgi?id=416436

Paul Floyd  changed:

   What|Removed |Added

 Blocks|412745  |


Referenced Bugs:

https://bugs.kde.org/show_bug.cgi?id=412745
[Bug 412745] Support macOS Catalina (10.15)
-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 416436] Unrecognised instruction at address 0x1006037BD (__pthread_init.cold.2) macOS 10.15

2026-03-09 Thread Paul Floyd
https://bugs.kde.org/show_bug.cgi?id=416436

Paul Floyd  changed:

   What|Removed |Added

 Status|CONFIRMED   |RESOLVED
 CC||[email protected]
 Resolution|--- |FIXED

--- Comment #3 from Paul Floyd  ---
The patch got merged a while back with the commit below so I'm closing this.

Author: Paul Floyd   2025-12-14 21:04:08
Committer: Paul Floyd   2025-12-17 19:42:34
Parent: d45b016046fd6af55e23891f9392e2b8c1193372 (Linux ppc32: map a few more
syscalls)
Branches: bug406674, bug514343, bug516202, freebsd, master,
remotes/github/freebsd, remotes/origin/master,
remotes/origin/users/mcermak/try-bug515810,
remotes/origin/users/paulf/try-bug233298,
remotes/origin/users/paulf/try-bug406674
Follows: VALGRIND_3_26_0
Precedes: 

Darwin: add macOS 10.15 support

== 721 tests, 46 stderr failures, 6 stdout failures, 0 stderrB failures, 0
stdoutB failures, 4 post failures ==

A couple more failures in none (empty-exe and scripts/shell). Otherwise
quite like
macOS 10.14.

Much of the code merged from Louis Brunner's git repo. Many thanks once
again
Louis.

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 416436] Unrecognised instruction at address 0x1006037BD (__pthread_init.cold.2) macOS 10.15

2026-03-09 Thread Paul Floyd
https://bugs.kde.org/show_bug.cgi?id=416436

Paul Floyd  changed:

   What|Removed |Added

 Blocks||412745


Referenced Bugs:

https://bugs.kde.org/show_bug.cgi?id=412745
[Bug 412745] Support macOS Catalina (10.15)
-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 416436] Unrecognised instruction at address 0x1006037BD (__pthread_init.cold.2) macOS 10.15

2020-02-11 Thread Louis Brunner
https://bugs.kde.org/show_bug.cgi?id=416436

--- Comment #2 from Louis Brunner  ---
Created attachment 125843
  --> https://bugs.kde.org/attachment.cgi?id=125843&action=edit
Fix _pthread_init illegal instruction by providing ptr_munge

I have been investigating the problem and I have a fix (patch included).

Some context: it is difficult to be sure without the libpthread sources for
10.15, but if you check libpthread-330.250.2 (for 10.14), you will find a
parse_ptr_munge_params function that tries to get ptr_munge value from the
environment (through the Apple environment or an actual environment variable,
PTHREAD_PTR_MUNGE_TOKEN). In previous versions, __pthread_init would just carry
on even if the value wasn't defined, but while stepping through the code, I
have found that macOS 10.15 seems to crash using the ud2 instruction just after
the environment variable check, hinting that this value is now required.

My patch adds PTHREAD_PTR_MUNGE_TOKEN with a value of 1 everytime valgrind
starts a program. Note that a value of 0 is considered an error by pthread.

Disclaimer: while I found where ptr_munge is generated (kernel) and used (some
kind of conversion in jmp instructions in libplatform), I don't understand what
it does exactly. On the other hand, the dummy value doesn't seem to make a
difference when executing a program with valgrind.

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 416436] Unrecognised instruction at address 0x1006037BD (__pthread_init.cold.2) macOS 10.15

2020-02-03 Thread Louis Brunner
https://bugs.kde.org/show_bug.cgi?id=416436

Louis Brunner  changed:

   What|Removed |Added

 CC||[email protected]

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 416436] Unrecognised instruction at address 0x1006037BD (__pthread_init.cold.2) macOS 10.15

2020-01-19 Thread John Reiser
https://bugs.kde.org/show_bug.cgi?id=416436

John Reiser  changed:

   What|Removed |Added

 CC||[email protected]

--- Comment #1 from John Reiser  ---
The 'ud2' instruction is the calling convention to request that MacOS respond
to a fatal error detected by run-time library code.  This is almost certainly a
symptom that valgrind did not emulate a recent system call correctly.  See
https://bugs.kde.org/show_bug.cgi?id=383723#c20 for a similar case more than 2
years ago.

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 416436] Unrecognised instruction at address 0x1006037BD (__pthread_init.cold.2) macOS 10.15

2020-01-18 Thread Rhys Kidd
https://bugs.kde.org/show_bug.cgi?id=416436

Rhys Kidd  changed:

   What|Removed |Added

   Assignee|[email protected] |[email protected]
 Status|REPORTED|CONFIRMED
 Ever confirmed|0   |1
 Blocks||412745


Referenced Bugs:

https://bugs.kde.org/show_bug.cgi?id=412745
[Bug 412745] Support macOS Catalina (10.15)
-- 
You are receiving this mail because:
You are watching all bug changes.