- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I'm trying to run an application compiled with gcc 5.2.0 using MPX instructions in SDE 7.31.0 on Linux. (-fno-omit-frame-pointer -fcheck-pointer-bounds -mmpx)
SDE is used as: sde -mpx-mode -- MyApplication
The executable seems to contain a bunch of MPX related symbols, such as
__mpxrt_utils_free
__mpx_wrapper_memmove
__mpx_wrapper_mmap
__mpxrt_write
However, SDE outputs "No MPX support". What is this error-message hinting at? No MPX in the executable, no MPX support by SDE, no MPX support by the kernel....???
Any help highly appreciated. :-)
- Markus
- Tags:
- Intel® Advanced Vector Extensions (Intel® AVX)
- Intel® Streaming SIMD Extensions
- Parallel Computing
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You need to link MPX-enabled apps with the SDE MPX runtime in order for them to work with SDE. That is explained on the SDE-MPX web page. The SDE MPX runtime handles setting up the bounds tables in memory and the exception handler that are required for using MPX.
When operating systems have their own MPX support in their kernel and user-level runtime , the SDE MPX runtime will no longer be required. SDE would have to change as well, of course.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How can I find out whether I have an MPX-enabled app with the SDE MPX runtime?
ldd MyApplication says:
linux-vdso.so.1 => (0x00007ffe10df3000)
libmpx-runtime64.so => /my/path/Intel_MPX/2014-02-13-mpx-runtime-external-lin/libmpx-runtime64.so (0x00007f2cab60f000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f2cab38c000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f2cab170000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f2caade5000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f2caabe0000)
/lib64/ld-linux-x86-64.so.2 (0x00007f2cab819000)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, Hard to know exactly what is going on in your example. I don't see the string "No MPX support" in the SDE sources or SDE MPX runtime sources. I am not running on an MPX-enabled processor and my kernel / system runtime are not MPX enabled.
Here's a full small example with a GCC5.2.0 configured with --enable-libmpx at build time and binutils 2.25. Maybe you can try this and show what happens?
% cat mpx.c int main(int argc, char *argv[]) { char buf[10]; buf[10] = 0; /*BAD*/ return 0; }
% /usr/local/gcc-5.2.0/bin/gcc -mmpx -fcheck-pointer-bounds -c mpx.c % /usr/local/gcc-5.2.0/bin/gcc 2014-02-13-mpx-runtime-external-lin/libmpx-runtime64.so -o mpx mpx.o -lpthread -ldl % setenv LD_LIBRARY_PATH 2014-02-13-mpx-runtime-external-lin % ./sde731/sde -mpx-mode -- ./mpx Bound violation detected,status 0x1 at 0x4005bb
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you, this helped: The example works just fine.
For my executables, I can not make really make the "No MPX support" message disappear (seems to be part of gcc_5.2.0/lib64/libmpx.*). I'll try to track this down further...
However, it at least works now as expected: I've used the linker-option -static-libmpxwrappers, which caused the program not to stop, even in case of a bounds-violation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
HI, I talked to the developer who implemented the gcc mpx runtime. The reason you get the "No MPX support" message from the GCC MPX runtime is that the kernel does not support MPX and you linked with GCC's MPX runtime. There is a prctl() call that fails. In my example, I did not link pass "-mmpx -fcheck-pointer-bounds" when linking so my example did not link against the GCC MPX runtime -- only linked with the SDE MPX runtime.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you, Mark! This explains it. When leaving out "-mmpx -fcheck-pointer-bounds" it works fine. I still need to link against libmpxwrappers which comes with the gcc, but this seems not to cause any issues.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page