| Summary: |
Valgrind does not support instructions sgdtq (x86_64) and sgdtl (x86) |
| Product: |
[Developer tools] valgrind
|
Reporter: |
Konstantin Serebryany <konstantin.s.serebryany> |
| Component: |
vex | Assignee: |
Julian Seward <jseward> |
| Status: |
RESOLVED
FIXED
|
|
|
| Severity: |
crash
|
CC: |
konstantin.s.serebryany, njn, tom
|
| Priority: |
NOR
|
|
|
| Version First Reported In: |
3.4 SVN | |
|
| Target Milestone: |
--- | |
|
| Platform: |
Compiled Sources | |
|
| OS: |
Linux | |
|
|
Latest Commit:
|
|
Version Fixed/Implemented In:
|
|
|
Sentry Crash Report:
|
|
| |
| Bug Depends on: |
|
|
|
| Bug Blocks: |
256630
|
|
|
The following code will fail under valgrind like this: vex x86->IR: unhandled instruction bytes: 0xF 0x1 0x45 0xDE #include <iostream> #include <pthread.h> // Compile and run: // g++ -m64 sgdtq.cc -lpthread && valgrind ./a.out void *sgdtq(void *) { char ret_val[16] __attribute__((__aligned__(16))); // valgrind will fail here: __asm__ __volatile__("sgdtq %0" : "=m" (ret_val[6])::"memory"); uint64_t id = *reinterpret_cast<uint64_t *>(&ret_val[8]); std::cout << id << std::endl; } int main() { const int N = 100; pthread_t t[N]; sgdtq(NULL); // start many threads. On a multi-cpu machine // this progam should print several different numbers. for (int i = 0; i < N; i++) { pthread_create(&t[i], 0, sgdtq, 0); } for (int i = 0; i < N; i++) { pthread_join(t[i], 0); } }