Sanjoy Das via llvm-dev
2016-Feb-29 16:21 UTC
[llvm-dev] Possible soundness issue with available_externally (split from "RFC: Add guard intrinsics")
On Sat, Feb 27, 2016 at 1:41 PM, Sanjoy Das <sanjoy at playingwithpointers.com> wrote:> Just as a reality check, I wrote up a demonstration where one link > order causes a SIGFPE and another doesn't (and the program is well > defined, as far as I can tell). All TUs are compiled with -O3. This is also > an instance where we don't actually speculate an inline function, but only > DSE across it (after deducing readnone). > > Here's the link https://github.com/sanjoy/comdat-ipoThis test case "works" with gcc 5.3.0 too, afaict. This is what I used: Using built-in specs. COLLECT_GCC=/usr/local/Cellar/gcc/5.3.0/bin/x86_64-apple-darwin15.0.0-g++-5 COLLECT_LTO_WRAPPER=/usr/local/Cellar/gcc/5.3.0/libexec/gcc/x86_64-apple-darwin15.0.0/5.3.0/lto-wrapper Target: x86_64-apple-darwin15.0.0 Configured with: ../configure --build=x86_64-apple-darwin15.0.0 --prefix=/usr/local/Cellar/gcc/5.3.0 --libdir=/usr/local/Cellar/gcc/5.3.0/lib/gcc/5 --enable-languages=c,c++,objc,obj-c++,fortran --program-suffix=-5 --with-gmp=/usr/local/opt/gmp --with-mpfr=/usr/local/opt/mpfr --with-mpc=/usr/local/opt/libmpc --with-isl=/usr/local/opt/isl --with-system-zlib --enable-libstdcxx-time=yes --enable-stage1-checking --enable-checking=release --enable-lto --with-build-config=bootstrap-debug --disable-werror --with-pkgversion='Homebrew gcc 5.3.0' --with-bugurl=https://github.com/Homebrew/homebrew/issues --enable-plugin --disable-nls --enable-multilib Thread model: posix gcc version 5.3.0 (Homebrew gcc 5.3.0) -- Sanjoy
Duncan P. N. Exon Smith via llvm-dev
2016-Feb-29 17:22 UTC
[llvm-dev] Possible soundness issue with available_externally (split from "RFC: Add guard intrinsics")
Nice repro. It looks well-defined to me too. Is there a PR open yet?> On 2016-Feb-29, at 08:21, Sanjoy Das via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > On Sat, Feb 27, 2016 at 1:41 PM, Sanjoy Das > <sanjoy at playingwithpointers.com> wrote: >> Just as a reality check, I wrote up a demonstration where one link >> order causes a SIGFPE and another doesn't (and the program is well >> defined, as far as I can tell). All TUs are compiled with -O3. This is also >> an instance where we don't actually speculate an inline function, but only >> DSE across it (after deducing readnone). >> >> Here's the link https://github.com/sanjoy/comdat-ipo > > This test case "works" with gcc 5.3.0 too, afaict. > > This is what I used: > > Using built-in specs. > COLLECT_GCC=/usr/local/Cellar/gcc/5.3.0/bin/x86_64-apple-darwin15.0.0-g++-5 > COLLECT_LTO_WRAPPER=/usr/local/Cellar/gcc/5.3.0/libexec/gcc/x86_64-apple-darwin15.0.0/5.3.0/lto-wrapper > Target: x86_64-apple-darwin15.0.0 > Configured with: ../configure --build=x86_64-apple-darwin15.0.0 > --prefix=/usr/local/Cellar/gcc/5.3.0 > --libdir=/usr/local/Cellar/gcc/5.3.0/lib/gcc/5 > --enable-languages=c,c++,objc,obj-c++,fortran --program-suffix=-5 > --with-gmp=/usr/local/opt/gmp --with-mpfr=/usr/local/opt/mpfr > --with-mpc=/usr/local/opt/libmpc --with-isl=/usr/local/opt/isl > --with-system-zlib --enable-libstdcxx-time=yes > --enable-stage1-checking --enable-checking=release --enable-lto > --with-build-config=bootstrap-debug --disable-werror > --with-pkgversion='Homebrew gcc 5.3.0' > --with-bugurl=https://github.com/Homebrew/homebrew/issues > --enable-plugin --disable-nls --enable-multilib > Thread model: posix > gcc version 5.3.0 (Homebrew gcc 5.3.0) > > -- Sanjoy > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Sanjoy Das via llvm-dev
2016-Feb-29 17:46 UTC
[llvm-dev] Possible soundness issue with available_externally (split from "RFC: Add guard intrinsics")
On Mon, Feb 29, 2016 at 9:22 AM, Duncan P. N. Exon Smith <dexonsmith at apple.com> wrote:> Nice repro. It looks well-defined to me too. > > Is there a PR open yet?Just filed PR26774. -- Sanjoy
Sanjoy Das via llvm-dev
2016-Feb-29 18:51 UTC
[llvm-dev] Possible soundness issue with available_externally (split from "RFC: Add guard intrinsics")
On Mon, Feb 29, 2016 at 8:21 AM, Sanjoy Das <sanjoy at playingwithpointers.com> wrote:> On Sat, Feb 27, 2016 at 1:41 PM, Sanjoy Das > <sanjoy at playingwithpointers.com> wrote: >> Just as a reality check, I wrote up a demonstration where one link >> order causes a SIGFPE and another doesn't (and the program is well >> defined, as far as I can tell). All TUs are compiled with -O3. This is also >> an instance where we don't actually speculate an inline function, but only >> DSE across it (after deducing readnone). >> >> Here's the link https://github.com/sanjoy/comdat-ipo > > This test case "works" with gcc 5.3.0 too, afaict.I should have been clearer here -- by the above I meant gcc also miscompiles the program in the same way. -- Sanjoy
Apparently Analagous Threads
- Possible soundness issue with available_externally (split from "RFC: Add guard intrinsics")
- Possible soundness issue with available_externally (split from "RFC: Add guard intrinsics")
- Possible soundness issue with available_externally (split from "RFC: Add guard intrinsics")
- Possible soundness issue with available_externally (split from "RFC: Add guard intrinsics")
- Auth-worker, unknown scheme ARGON2ID