Q
Q
q2zoff2019-06-19 15:21:38
linux
q2zoff, 2019-06-19 15:21:38

Error reading by null pointer. Is it possible to skew?

Hello.
There is a Linux application written in C compiled with GCC. Extremely rarely, when once a week, when once a month, the application terminates with a null pointer read error (dmesg: error 4).
There is absolutely no desire to look for this error with valgrind. Because, firstly, it takes a long time, and secondly, as you know, under valgrind, the performance of programs decreases sharply. You can search for bugs until the second coming.
Question. Is there any way to allow reading by null pointer? For example, using compilation flags or something else?
Can dmesg messages be made more informative? To at least get the name of the function in which the error occurs? So far I have this description:

spoiler
[304600.838283] myprog[24544]: segfault at 2be8c000 ip 000000000047ccf8 sp 00007fff2b486a60 error 4 in myprog[400000+271000]

PS I don't want to look for a problem with strace in this case either, but I might have to :)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2019-06-19
@q27off

Get coredump and open it in gdb

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question