search for: sortchecker

Displaying 6 results from an estimated 6 matches for "sortchecker".

2016 Jan 14
2
RFC: Extend UBSan with qsort checks
...ents there. >>>>>>> This functionality can be controlled by a runtime flag. >>>>>>> >>>>>>> Why do you need compiler instrumentation? Do you want to >>>>>>> automatically >>>>>>> inject hooks to SortChecker into std::sort() functions, so that you >>>>>>> don't >>>>>>> need to annotate C++ standard library code? >>>>>>> We submitted some annotations to libc++ code (e.g. to report >>>>>>> containter >>>>&...
2016 Jan 11
2
RFC: Extend UBSan with qsort checks
...ray to bsearch * etc. Errors like this will usually result in slightly invalid output (not fully sorted arrays, rare failed bsearches, etc.) but may as well cause aborts on some systems (https://bugzilla.samba.org/show_bug.cgi?id=3959). I've recently developed a simple proof-of-concept tool SortChecker (https://github.com/yugr/sortcheck) which intercepts calls to qsort and friends (via LD_PRELOAD) and performs various sanity checks before passing control to libc e.g. * sign(cmp(a, b)) == - sign(cmp(b, a)) for all array elements * etc. Results were quite inspiring: I've found several error...
2016 Jan 12
4
RFC: Extend UBSan with qsort checks
...San with another tools. There is an > opportunity to, say, add qsort() interceptor to ASan/TSan/MSan, and check > arguments there. > This functionality can be controlled by a runtime flag. > > Why do you need compiler instrumentation? Do you want to automatically > inject hooks to SortChecker into std::sort() functions, so that you don't > need to annotate C++ standard library code? > We submitted some annotations to libc++ code (e.g. to report containter > overflow bugs in sanitizers). > > [1] -fsanitize=vptr is an only notable exception > > One notorious insta...
2016 Jan 13
2
RFC: Extend UBSan with qsort checks
...opportunity to, say, add qsort() interceptor to ASan/TSan/MSan, and check >>> arguments there. >>> This functionality can be controlled by a runtime flag. >>> >>> Why do you need compiler instrumentation? Do you want to automatically >>> inject hooks to SortChecker into std::sort() functions, so that you don't >>> need to annotate C++ standard library code? >>> We submitted some annotations to libc++ code (e.g. to report containter >>> overflow bugs in sanitizers). >>> >>> [1] -fsanitize=vptr is an only notable...
2016 Jan 13
2
RFC: Extend UBSan with qsort checks
...an, and >>>>> check >>>>> arguments there. >>>>> This functionality can be controlled by a runtime flag. >>>>> >>>>> Why do you need compiler instrumentation? Do you want to automatically >>>>> inject hooks to SortChecker into std::sort() functions, so that you >>>>> don't >>>>> need to annotate C++ standard library code? >>>>> We submitted some annotations to libc++ code (e.g. to report containter >>>>> overflow bugs in sanitizers). >>>>&gt...
2016 Jan 14
2
RFC: Extend UBSan with qsort checks
...>>>> >>>> But debug operator() only knows about 2 inputs whereas for transitivity >>>> you'll need to consider at least 3. > > As I privately replied to Kostya, I was only willing to add constant overhead. Sure, there are various conflicting tradeoffs. SortChecker started as an experiment so I was as agressive as possible. > SortChecker adds N*N overhead: > https://github.com/yugr/sortcheck/blob/master/src/sortchecker.c#L427 > except he caps it at N=32 on line 413 I'm afraid it's even N^3 (with N=32 cap). This indeed sounds scary but I hav...