search for: qsort

Displaying 20 results from an estimated 277 matches for "qsort".

Did you mean: sort
2015 Dec 28
3
Interpreting DSCallGraph results
...e DSCallGraph to get a conservative estimate of a whole-program SCC call graph. I wanted to see how it handles real call-graph cycles involving functions both internal and external to the module. So I made a test program with the following actual call graph, using the standard library's "qsort" function: main --> DoSorting DoSorting --> qsort(..., QsortCallback) qsort --> QsortCallback (via callback) QsortCallback --> DoSorting There were two things in DSCallGraph's results which surprised me: - "qsort" was placed int...
2005 Apr 25
0
[LLVMdev] help with qsort etc.
Hi, When you write a program which uses the "qsort()" library function, You also have to provide an implementation of a compare funtion. Now when we convert our program into bc and then execute it, I get the number of times all basic blocks are executed. But since the comparison function is called from within the std function "qsort()...
2013 Feb 20
0
[LLVMdev] LLVM Interpreter & Qsort
Hi, I am trying to run an LLVM analysis on a C++ program that calls qsort(), using the LLVM interpreter (lli --force-interpreter). The code is the qsort_large.c file in the MiBench benchmark suite. If I comment the qsort() call, the execution works fine. If I uncomment the qsort() call, I run into a segmentation fault error as follows: 0 lli 0x0000000000d35...
2006 Jul 21
1
[LLVMdev] qsort
Dear All, Is there a reason why the qsort() implementation in llvm/runtime/GCCLibraries/libc/qsort.c is commented out? I've run it on Linux, and so far it seems to work fine. -- John T.
2013 Feb 20
0
[LLVMdev] LLVM Interpreter & QSort
Hi, I am trying to run an LLVM analysis on a C++ program that calls qsort(), using the LLVM interpreter (lli --force-interpreter). The code is the qsort_large.c file in the MiBench benchmark suite. If I comment the qsort() call, the execution works fine. If I uncomment the qsort() call, I run into a segmentation fault error as follows: 0  lli             0x000000000...
2010 Dec 14
1
[LLVMdev] qsort callbacks portability issues
Hi, there are a couple of possible issues around array_pod_sort from STLExtras.h . Firstly, qsort() needs a comparator that returns zero on equal inputs. ConstantIntSortPredicate in SimplifyCFG.cpp (where the sort is being used to bring duplicate values together) fails this requirement. All the others look ok. Secondly, on Windows qsort() needs its callback to use __cdecl calling convention,...
2016 Jan 11
2
RFC: Extend UBSan with qsort checks
Hi all, UndefinedBehaviorSanitizer currently does not check for undefined behaviors which result from improper usage of standard library functions. One notorious instance of such errors is invalid usage of qsort or bsearch routines (or std::sort and friends in case of C++): * using comparison function that violates ordering axioms (reflexivity, symmetry, transitivity) * returning unstable results from comparison function * passing unsorted array to bsearch * etc. Errors like this will usually result in...
2002 Jul 26
1
libvorbis-1.0 patch for Solaris 5.8 buggy libc qsort.
Solaris 5.8 has a quirky qsort that requires the ability to recognize elements as equal. here is a patch I have created to deal w/ this problem. I apologize if the patch is in the wrong format and would love to be corrected if wrong. I used the following to create the patch libvorbis-1.0> diff -u lib/psy.c lib/psy_new.c &g...
2011 Jul 10
0
[LLVMdev] How to get line number of a function in a bitcode file?
I tried to install the SAFECode in LLVM 2.6 following the instruction in Install.html. But when I do the step: # cd projects/poolalloc # make I get the errore below: llvm[2]: Compiling qsort.c for Release build (bytecode) llvm[2]: Compiling strdup.c for Release build (bytecode) llvm[2]: Compiling qsort.c for Release build llvm[2]: Compiling strdup.c for Release build llvm[2]: Compiling qsort.ll to qsort.bc for Release build (bytecode) llvm[2]: Compiling strdup.ll to strdup.bc for Relea...
2016 Jan 12
4
RFC: Extend UBSan with qsort checks
...ool (with -fsanitize-trap=undefined). It's challenging to add UBSan > interceptors at this point: this would limit the tool portability (at least > portability of some functionality), > and complicate interoperation of UBSan 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...
2016 Jan 13
2
RFC: Extend UBSan with qsort checks
...ned). It's challenging to add UBSan >>> interceptors at this point: this would limit the tool portability (at least >>> portability of some functionality), >>> and complicate interoperation of UBSan 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() fu...
2012 May 07
0
[LLVMdev] A problem with optimal edge profiling.
...iling. Nothing happens right after the command "opt a.bc -profile-loader -o b.bc" which tries to load optimal edge profile from the llvmprof.out file. I mean it starts to compute but never ends (I checked CPU Usage). For example, a log of my actions: anon at anonVB:~/MiBench/ automotive/qsort$ clang qsort_large.c -emit-llvm -c -o a.bc anon at anonVB:~/MiBench/automotive/qsort$ opt a.bc -insert-optimal-edge-profiling -O2 -o a_oep.bc anon at anonVB:~/MiBench/automotive/qsort$ llc a_oep.bc -O2 -o a.s anon at anonVB:~/MiBench/automotive/qsort$ clang a.s ./libprofile_rt.so -O2 -o a anon at a...
1998 May 13
1
Compiling warnings in 1.9.18p7
I get these messages when compiling on a Sun Sparc 5 running Solaris 2.6: Compiling ipc.c ipc.c: In fonction `api_RNetServerEnum': ipc.c:1194: warning: passing arg 4 of `qsort' from incompatible pointer type Compiling nmbd_incomingrequests.c nmbd_incomingrequests.c: In function `process_node_status_request': nmbd_incomingrequests.c:380: warning: passing arg 4 of `qsort' from incompatible pointer type Compiling client.c client.c: In function `browse_host'...
2004 Jul 26
1
klibc warnings
Noticed a few warnings while playing with klibc. Would be nice to have them fixed before pushing for inclusion in the kernel. usr/lib/readdir.c: In function `readdir': usr/lib/readdir.c:54: warning: use of cast expressions as lvalues is deprecated usr/lib/qsort.c: In function `qsort': usr/lib/qsort.c:33: warning: use of cast expressions as lvalues is deprecated usr/lib/sha1hash.c: In function `main': usr/lib/sha1hash.c:292: warning: unused variable `j' s/lib/klibc/g in the above to get right path. Sam
2001 Aug 16
2
bug in rc2: floor1.c
Hello, There is a bug in the current version of vorbis/lib/floor1.c. The line that says:- qsort(sortpointer,n,sizeof(int),icomp); should be:- qsort(sortpointer,n,sizeof(int *),icomp); But somebody probably fixed that already. :) Also, I'd like to know how I can encode a file using the channel coupling modes. oggenc doesn't have an option for that yet. Greetings, Mic...
2016 Jan 13
2
RFC: Extend UBSan with qsort checks
...gt;> interceptors at this point: this would limit the tool portability (at >>>>> least >>>>> portability of some functionality), >>>>> and complicate interoperation of UBSan 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 >&gt...
2016 Jan 14
2
RFC: Extend UBSan with qsort checks
...portability (at >>>>>>> least >>>>>>> portability of some functionality), >>>>>>> and complicate interoperation of UBSan 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 instrumentati...
2016 Jan 14
2
RFC: Extend UBSan with qsort checks
...;>>> least >>>>>>>>> portability of some functionality), >>>>>>>>> and complicate interoperation of UBSan 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. >>>>>>>>> >>>>>>>>&gt...
2015 Jul 21
1
[PATCH] p2v: tests: Don't fail when test machine has only a single hard disk.
...o non-removable disks were discovered on this machine.\n", - guestfs_int_program_name); - fprintf (stderr, "virt-p2v looked in /sys/block.\n"); - fprintf (stderr, "This is a fatal error and virt-p2v cannot continue.\n"); - exit (EXIT_FAILURE); - } - - qsort (all_disks, nr_disks, sizeof (char *), compare); + if (all_disks) + qsort (all_disks, nr_disks, sizeof (char *), compare); if (all_removable) qsort (all_removable, nr_removable, sizeof (char *), compare); } -- 2.4.3
2010 Apr 11
3
Help me with writing function sort()
Hello everyone, i`m new here.. I just started with learning R language and i have hard "homework". I need to write function like sort().. Anyone know how to do it? Can u give me algorithm for sorting vector? x=c(1,2,-1,1,3,4) or something like that.. I`m sorry for my english.. -- View this message in context: http://n4.nabble.com/Help-me-with-writing-function-sort-tp1836063p1836063.html