On machines with MPX, gcc/testsuite/gcc.target/i386/mpx/memmove-1.c from GCC 8 failed under kernel 4.20: [hjl@gnu-skl-1 tmp]$ gcc -fcheck-pointer-bounds -mmpx /export/gnu/import/git/sources/gcc-release/gcc/testsuite/gcc.target/i386/mpx/memmove-1.c [hjl@gnu-skl-1 tmp]$ ./a.out Segmentation fault [hjl@gnu-skl-1 tmp]$ [ 75.636402] BUG: Bad rss-counter state mm:000000002cc54919 idx:0 val:328 [ 75.636431] BUG: Bad rss-counter state mm:000000002cc54919 idx:1 val:28 [ 75.636453] BUG: non-zero pgtables_bytes on freeing mm: 24576
Here's a fix: http://lkml.kernel.org/r/20190401141549.3F4721FE@viggo.jf.intel.com Testing would be appreciated.
This is triggered by commit dd2283f2605e3b3e9c61bcae844b34f2afa4813f Author: Yang Shi <yang.shi@linux.alibaba.com> Date: Fri Oct 26 15:07:11 2018 -0700 mm: mmap: zap pages with read mmap_sem in munmap
(In reply to Dave Hansen from comment #1) > Here's a fix: > > http://lkml.kernel.org/r/20190401141549.3F4721FE@viggo.jf.intel.com > > Testing would be appreciated. Yes, it did fix the problem.
MPX has been deprecated.