summaryrefslogtreecommitdiffstats
path: root/compiler-rt/test/ubsan/TestCases/Integer
Commit message (Collapse)AuthorAgeFilesLines
* [ubsan][test] Restore float-divide-by-zero testFangrui Song2019-07-101-0/+1
| | | | | | Removed by rCTE365307 to fix buildbots. It can be restored now because D64317/rC365587 brought back -fsanitize=float-divide-by-zero llvm-svn: 365591
* [ubsan][test] Fix cast-overflow.cpp and delete float-divide-by-zero test ↵Fangrui Song2019-07-081-1/+0
| | | | | | after D63793/rC365272 llvm-svn: 365307
* [ubsan] Make suppressions.cpp test pass for me on WindowsReid Kleckner2019-02-011-1/+4
| | | | | | | | | | | The test seems to be failing because the module suppression file contains a colon. I found that it was sufficient to just use the basename of the suppression file. While I was here, I noticed that we don't implement IsAbsolutePath for Windows, so I added it. llvm-svn: 352921
* [compiler-rt][UBSan] silence_unsigned_overflow: do *NOT* ignore *fatal* ↵Roman Lebedev2018-11-211-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | unsigned overflows Summary: D48660 / rL335762 added a `silence_unsigned_overflow` env flag for [[ https://github.com/google/oss-fuzz/pull/1717 | oss-fuzz needs ]], that allows to silence the reports from unsigned overflows. It makes sense, it is there because `-fsanitize=integer` sanitizer is not enabled on oss-fuzz, so this allows to still use it as an interestingness signal, without getting the actual reports. However there is a slight problem here. All types of unsigned overflows are ignored. Even if `-fno-sanitize-recover=unsigned` was used (which means the program will die after the report) there will still be no report, the program will just silently die. At the moment there are just two projects on oss-fuzz that care: * [[ https://github.com/google/oss-fuzz/blob/8eeffa627f937040aaf8ba1b7d93f43f77d74fb9/projects/llvm_libcxx/build.sh#L18-L20 | libc++ ]] * [[ https://github.com/google/oss-fuzz/blob/8eeffa627f937040aaf8ba1b7d93f43f77d74fb9/projects/librawspeed/build.sh | RawSpeed ]] (me) I suppose this could be overridden there ^, but i really don't think this is intended behavior in any case.. Reviewers: kcc, Dor1s, #sanitizers, filcab, vsk, kubamracek Reviewed By: Dor1s Subscribers: dberris, mclow.lists, llvm-commits Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D54771 llvm-svn: 347415
* [UBSan] Followup for silence_unsigned_overflow flag to handle negate overflows.Max Moroz2018-07-131-1/+3
| | | | | | | | | | | | | | | | | | | | Summary: That flag has been introduced in https://reviews.llvm.org/D48660 for suppressing UIO error messages in an efficient way. The main motivation is to be able to use UIO checks in builds used for fuzzing as it might provide an interesting signal to a fuzzing engine such as libFuzzer. See https://github.com/google/oss-fuzz/issues/910 for more information. Reviewers: morehouse, kcc Reviewed By: morehouse Subscribers: kubamracek, delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D49324 llvm-svn: 337068
* [UBsan] Enable subset of unit tests for OpenBSDDavid Carlier2018-06-301-0/+2
| | | | | | | | | | Reviewers: kubamracek, krytarowski Reviewed By: krytarowski Differential Revision: https://reviews.llvm.org/D48805 llvm-svn: 336053
* [UBSan] Add silence_unsigned_overflow flag.Matt Morehouse2018-06-271-0/+2
| | | | | | | | | | | | | | | | | | | | Summary: Setting UBSAN_OPTIONS=silence_unsigned_overflow=1 will silence all UIO reports. This feature, combined with -fsanitize-recover=unsigned-integer-overflow, is useful for providing fuzzing signal without the excessive log output. Helps with https://github.com/google/oss-fuzz/issues/910. Reviewers: kcc, vsk Reviewed By: vsk Subscribers: vsk, kubamracek, Dor1s, llvm-commits Differential Revision: https://reviews.llvm.org/D48660 llvm-svn: 335762
* [sanitizer] Test ubsan and cfi on android.Evgeniy Stepanov2017-10-061-0/+1
| | | | | | | | | | | | | | | Summary: Enable check-cfi and check-ubsan on Android. Check-ubsan includes standalone and ubsan+asan, but not tsan or msan. Cross-dso cfi tests are disabled for now. Reviewers: vitalybuka, pcc Subscribers: srhines, kubamracek, llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D38608 llvm-svn: 315105
* Fix negate-overflow.cpp test on Windows after r303440Hans Wennborg2017-05-241-2/+4
| | | | | | lit would interpret the exit code as failuire. llvm-svn: 303809
* [ubsan] Use the correct tool name in diagnosticsVedant Kumar2017-04-141-2/+2
| | | | | | | | | | | | | | | When using ASan and UBSan together, the common sanitizer tool name is set to "AddressSanitizer". That means that when a UBSan diagnostic is printed out, it looks like this: SUMMARY: AddressSanitizer: ... This can confuse users. Fix it so that we always use the correct tool name when printing out UBSan diagnostics. Differential Revision: https://reviews.llvm.org/D32066 llvm-svn: 300358
* When building without DIA SDK, don't set suppressions.cpp failNico Weber2016-01-221-7/+4
| | | | | | | | | | | This test requires llvm-symbolizer to be able to convert a stack address into a function name. It is only able to do this if the DIA SDK was found at cmake time. Add a lit feature for this, and let the test depend on it. See also discussion in D15363. llvm-svn: 258545
* Re-disable suppressions.cpp on Windows.Nico Weber2016-01-151-0/+6
| | | | | | See discussion in http://reviews.llvm.org/D15363 llvm-svn: 257952
* Make ubsan suppression test pass on Windows.Nico Weber2016-01-081-13/+5
| | | | llvm-svn: 257183
* XFAIL ubsan suppressions.cpp test on Windows for now.Nico Weber2015-12-231-0/+8
| | | | llvm-svn: 256307
* [UBSan] Implement runtime suppressions (PR25066).Alexey Samsonov2015-12-181-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Add the ability to suppress UBSan reports for files/functions/modules at runtime. The user can now pass UBSAN_OPTIONS=suppressions=supp.txt with the contents of the form: signed-integer-overflow:file-with-known-overflow.cpp alignment:function_doing_unaligned_access vptr:shared_object_with_vptr_failures.so Suppression categories match the arguments passed to -fsanitize= flag (although, see below). There is no overhead if suppressions are not provided. Otherwise there is extra overhead for symbolization. Limitations: 1) sometimes suppressions need debug info / symbol table to function properly (although sometimes frontend generates enough info to do the match). 2) it's only possible to suppress recoverable UB kinds - if you've built the code with -fno-sanitize-recover=undefined, suppressions will not work. 3) categories are fine-grained check kinds, not groups like "undefined" or "integer", so you can't write "undefined:file_with_ub.cc". Reviewers: rsmith, kcc Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D15363 llvm-svn: 256018
* Fix the RUN on UBSAN unit testsSumanth Gundapaneni2015-12-011-1/+1
| | | | | | | | | For the build set up which runs the unit tests using an emulator like QEMU, the unit tests must be run using %run. Differential Revision: http://reviews.llvm.org/D15081 llvm-svn: 254467
* [ubsan] Invoke test program using %run.Filipe Cabecinhas2015-10-121-1/+1
| | | | llvm-svn: 250063
* [UBSan] Test churn: use the approach from r244839 and r245962 in UBSan lit ↵Alexey Samsonov2015-08-251-1/+1
| | | | | | | | | | | tests. Introduce %env_ubsan_opts= substitution instead of specifying UBSAN_OPTIONS manually in the RUN-lines. This will come in handy once we introduce some default UBSAN_OPTIONS for the whole testsuite (for instance, make abort_on_error common option). llvm-svn: 245967
* [UBSan] Add the ability to print more precise error kind in summary line.Alexey Samsonov2015-08-241-2/+5
| | | | | | | | | | Reviewers: rsmith, pcc Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D12215 llvm-svn: 245897
* UBSan: Enable runtime library tests on Windows, and get most tests passing.Peter Collingbourne2015-07-029-43/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | Specifically: - Disable int128 tests on Windows, as MSVC cl.exe does not support int128, so we might not have been able to build the runtime with int128 support. - XFAIL the vptr tests as we lack Microsoft ABI support. - XFAIL enum.cpp as UBSan fails to add the correct instrumentation code for some reason. - Modify certain tests that build executables multiple times to use unique names for each executable. This works around a race condition observed on Windows. - Implement IsAccessibleMemoryRange for Windows to fix the last misaligned.cpp test. - Introduce a substitution for testing crashes on Windows using KillTheDoctor. Differential Revision: http://reviews.llvm.org/D10864 llvm-svn: 241303
* [UBSan] Unify the way we report overflow in increment/decrement operator.Alexey Samsonov2015-04-231-6/+6
| | | | llvm-svn: 235569
* Revert "Revert "[UBSan] Add testcases for -fsanitize=shift-base and ↵Alexey Samsonov2015-03-091-13/+21
| | | | | | | | | -fsanitize=shift-exponent."" Re-land r231151 now that -fsanitize=shift-base implementation should not introduce undefined behavior. llvm-svn: 231712
* Revert "[UBSan] Add testcases for -fsanitize=shift-base and ↵Alexey Samsonov2015-03-051-21/+13
| | | | | | | | -fsanitize=shift-exponent." The test case fails on AArch64. llvm-svn: 231410
* [UBSan] Add testcases for -fsanitize=shift-base and -fsanitize=shift-exponent.Alexey Samsonov2015-03-031-13/+21
| | | | llvm-svn: 231151
* [Sanitizer] Print column number in SUMMARY line if it's available.Alexey Samsonov2015-02-271-1/+1
| | | | llvm-svn: 230721
* Update test cases for new -fsanitize-recover= semantics.Alexey Samsonov2015-01-121-2/+2
| | | | llvm-svn: 225725
* Disable the ubsan-asan config on Darwin.Alexander Potapenko2014-10-011-2/+0
| | | | | | UBSan doesn't work together with ASan on Darwin yet, see http://llvm.org/bugs/show_bug.cgi?id=21112 llvm-svn: 218746
* [UBsan] Disable summary.cpp on Darwin. The test requires ubsan-asan, which ↵Alexander Potapenko2014-09-301-0/+2
| | | | | | does not work yet. llvm-svn: 218675
* UBSan: print 'undefined-behavior' instead of 'runtime-error' in report summaryAlexey Samsonov2014-09-221-1/+1
| | | | llvm-svn: 218264
* [UBSan] Optionally report summary in UBSan error reports.Alexey Samsonov2014-09-191-0/+10
| | | | | | | By default summary is not printed if UBSan is run in a standalone mode, but is printed if it's combined with another sanitizer (like ASan). llvm-svn: 218135
* [UBSan] Try to enable pipefail in UBSan lit tests to make them behave more ↵Alexey Samsonov2014-07-291-1/+1
| | | | | | predictably llvm-svn: 214149
* Add %run to all lit testsGreg Fitzgerald2014-04-3013-42/+42
| | | | llvm-svn: 207709
* Move UBSan test suite under test/Alexey Samsonov2014-02-1413-0/+287
llvm-svn: 201401
OpenPOWER on IntegriCloud