https://bugs.kde.org/show_bug.cgi?id=387690

            Bug ID: 387690
           Summary: glfwInit() causes valgrind to crash
           Product: valgrind
           Version: unspecified
          Platform: Compiled Sources
                OS: OS X
            Status: UNCONFIRMED
          Severity: crash
          Priority: NOR
         Component: memcheck
          Assignee: jsew...@acm.org
          Reporter: therealbenwi...@gmail.com
  Target Milestone: ---

I'm not smart enough to know whether this is a bug with valgrind or with glfw
so I'm posting it on both bug trackers... hopefully someone in one of those
places will know what's going on ([GLFW
thread](https://github.com/glfw/glfw/issues/1156)).

I'm using CLion 2017.3's new Valgrind Memcheck integration. I'm on macOS High
Sierra 10.13.1.

Compiled valgrind from [valgrind
master](http://valgrind.org/downloads/repository.html) @
`1ce04c35c2ebbc8ea3c2b38ba69daa9dd40cde35` (preliminary Darwin support, as
suggested in [this thread](https://bugs.kde.org/show_bug.cgi?id=383811)).

I've reduced my code to:

```c++
#define GLFW_INCLUDE_NONE
#include <GLFW/glfw3.h>

int main()
{
  glfwInit(); // valgrind crashes
}
```
This is my output:
```bash
/path/to/bin/valgrind --tool=memcheck --xml=yes
--xml-file=/private/var/folders/lf/11gl5cgn14s9lyn933tg134m0000gq/T/valgrind
--gen-suppressions=all --leak-check=full --leak-resolution=med
--track-origins=yes /path/to/my/executable
--15650-- run: /usr/bin/dsymutil "/path/to/my/executable"
--15650-- UNKNOWN mach_msg unhandled MACH_SEND_TRAILER option
--15650-- UNKNOWN mach_msg unhandled MACH_SEND_TRAILER option (repeated 2
times)
--15650-- UNKNOWN mach_msg unhandled MACH_SEND_TRAILER option (repeated 4
times)
==15650== valgrind: Unrecognised instruction at address 0x1062a2ecf.
==15650== Your program just tried to execute an instruction that Valgrind
==15650== did not recognise.  There are two possible reasons for this.
==15650== 1. Your program has a bug and erroneously jumped to a non-code
==15650==    location.  If you are running Memcheck and you just saw a
==15650==    warning about a bad jump, it's probably your program's fault.
==15650== 2. The instruction is legitimate but Valgrind doesn't handle it,
==15650==    i.e. it's Valgrind's fault.  If you think this is the case or
==15650==    you are not sure, please let us know and we'll try to fix it.
==15650== Either way, Valgrind will now raise a SIGILL signal which will
==15650== probably kill your program.

Process finished with exit code 4
```

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to