On 1/13/26 21:26, Christian Groessler wrote:
I've noticed that the kernel covers up unaligned memory accesses,
see this dmesg message (and the program doesn't crash):

[26186.220638] unal(9569): unaligned access to 0x000110e9 at ip 0x00010543 (iir 
0x0f40109c)

Is there a way to disable the handling of unaligned accesses in kernel 6.x?
I'd like to get a bus error (SIGBUS or other signal) so I can find
the places in the code where unaligned accesses are done.
See "What are “unaligned access” messages about?" section in the FAQ at:
https://parisc.docs.kernel.org/en/latest/parisc_faq.html

You can start your program with the prctl program.
prctl --unaligned=[silent|signal|always-signal|default] your_program_name 
changes the behaviour for the started program and all it’s child processes. 
Read the man documentation for prctl for more details.

Helge

Reply via email to