Re: writing a (userland) core dump with incomplete info
[email protected] (Christos Zoulas) Sat, 28 Dec 2024 18:34:19 -0000 (UTC)
| Newsgroups | gmane.os.netbsd.devel.toolchain |
|---|---|
| Message-ID | <[email protected]> |
In article <[email protected]>, Martin Husemann <[email protected]> wrote: >Hey folks, > >a mabye stupid question: PR 58936 describes a userland process smashing >its memory and triggering a core dump, but due to the memory corruption >we get invalid addresses for the environmen and then fail to find the >proper auxv vector: > >proc_getauxv(pid 21737 cmd swipl) - > ps_envstr 0x697220616e737765 nenvstr 1920154122 auxv 0x69722065020d47bd > > >proc_getauxv() then fails with EFAULT and we fail writing the auxv note >in the core dump, and then stop the whole core writing process early, leaving >the user with a zero sized swipl.core file. > >Can we do better? Does it make sense try debugging stuff w/o the auxv vector? Well, perhaps the core writer can be more careful about making sure that the environment is well-formed. christos