This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/11522] Uninitialised Variable in qsort_r


https://sourceware.org/bugzilla/show_bug.cgi?id=11522

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
              Flags|                            |security-

--- Comment #2 from LuÃs Fernando Schultz Xavier da Silveira <lfsxs0 at gmail dot com> ---
Subject: Re:  New: Uninitialised Variable in qsort_r

Sorry for this and thank you for your attention.

On Tue, Apr 20, 2010 at 03:33:23AM -0000, lfsxs0 at gmail dot com wrote:
> In short, the following extract from stdlib/msort.c, lines 182-185, shows the
> variable phys_pages is used before initialization in a zero comparison. Is this
> legal?
> 
> static long int phys_pages;
> static int pagesize;
> 
> if (phys_pages == 0)
> 
> Furthermore, I have a question about qsort opening the /proc/meminfo file to get
> the total available memory: I run ACM-ICPC-like contests and use a ptrace-based
> sandbox software I wrote exactly for this. It keeps reporting a contestant is
> opening a file when he/she is actually just qsort'ing some array. Is there a way
> to prevent this behaviour?
> 
> Thank you.
> 
> -- 
>            Summary: Uninitialised Variable in qsort_r
>            Product: glibc
>            Version: 2.10
>             Status: NEW
>           Severity: normal
>           Priority: P2
>          Component: libc
>         AssignedTo: drepper at redhat dot com
>         ReportedBy: lfsxs0 at gmail dot com
>                 CC: glibc-bugs at sources dot redhat dot com
>  GCC build triplet: x86_64-pc-linux-gnu
>   GCC host triplet: x86_64-pc-linux-gnu
> GCC target triplet: x86_64-pc-linux-gnu
> 
> 
> http://sourceware.org/bugzilla/show_bug.cgi?id=11522
> 
> ------- You are receiving this mail because: -------
> You reported the bug, or are watching the reporter.


-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]