• valgrind => "Invalid write"

    From Andrew Pennebaker@21:1/5 to All on Thu Nov 8 16:38:09 2018
    I can valgrind my C/C++ apps in Debian, but when I try to run valgrind in OpenBSD, it complains "Invalid write" :/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marc Espie@21:1/5 to [email protected] on Sat Nov 10 10:35:25 2018
    In article <[email protected]>,
    Andrew Pennebaker <[email protected]> wrote:
    I can valgrind my C/C++ apps in Debian, but when I try to run valgrind
    in OpenBSD, it complains "Invalid write" :/


    It's possible the memory model is more strict.
    It's also possible that valgrind does some things wrong.

    Try running it on OpenBSD using strong malloc flags ? refer to malloc's manpage. If you're running -current, it's now a sysctl, it used to be
    a symlink called /etc/malloc.conf.

    Setting it to "S" should help you debug things.

    One big difference is that OpenBSD now has clang as default compiler.
    And uses libc++ by default for C++ apps. Some sloppy stuff you're doing
    might not agree with that...

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)