Sujet : Re: Memory protection between compilation units?
De : mateusz (at) *nospam* x.invalid (Mateusz Viste)
Groupes : comp.lang.cDate : 12. Jun 2025, 13:31:17
Autres entêtes
Organisation : ...
Message-ID : <20250612143117.5eb15edb@mateusz>
References : 1 2
User-Agent : Claws Mail 4.2.0 (GTK 3.24.43; x86_64-suse-linux-gnu)
On Wed, 11 Jun 2025 17:14 David Brown wrote:
For debugging problems like this with gdb, you can put a data
breakpoint on the pointer that is your known symptom. Set it to stop
when something writes 0 to it - then you can see where you are in
code when that happens. Of course, that will be a real pain if it
only happens once a week.
The idea is good, but as you observed it is hard to apply in a
production situation when the issue happens like three times a month.
In fact, a breakpoint would be even overkill - I'd be perfectly happy
for the program crashing when said variable changes. Like a
runtime-setup assertion that constantly checks the state of the
variable. Sadly, I'm not aware of such mechanism either. :)
Mateusz