Re: seemingly bogus error reports
David Chapman <[email protected]>
| Newsgroups | gmane.comp.debugging.valgrind |
|---|---|
| Organization | Chapman Consulting |
| Message-ID | <[email protected]> |
On 9/14/2019 12:11 PM, Fred Smith wrote:
>
> Hi all!
>
> IÂ’m new to this list, but have used Valgrind many times in the past.
>
> Today IÂ’m making a serious effort to clean up a non-trivial body of
> code, and have run into a number of error reports like this one:
>
> ==00:00:00:11.329 1533== Conditional jump or move depends on
> uninitialised value(s)
>
> ==00:00:00:11.329 1533==Â Â Â at 0x7B0BCC2: ttci2n (in
> /home/interface/interface/oralib-12/lib/libclntsh.so.12.1)
>
> ==00:00:00:11.329 1533==Â Â Â by 0x7B20DF5: ttcacs (in
> /home/interface/interface/oralib-12/lib/libclntsh.so.12.1)
>
> ==00:00:00:11.329 1533==Â Â Â by 0x7AF2503: ttcdrv (in
> /home/interface/interface/oralib-12/lib/libclntsh.so.12.1)
>
> ==00:00:00:11.329 1533==Â Â Â by 0x7AE14C8: nioqwa (in
> /home/interface/interface/oralib-12/lib/libclntsh.so.12.1)
>
> ==00:00:00:11.329 1533==Â Â Â by 0x7AC35CB: upirtrc (in
> /home/interface/interface/oralib-12/lib/libclntsh.so.12.1)
>
> ==00:00:00:11.329 1533==Â Â Â by 0x7ACDDE5: kpurcsc (in
> /home/interface/interface/oralib-12/lib/libclntsh.so.12.1)
>
> ==00:00:00:11.329 1533==Â Â Â by 0x7AC710D: kpuexec (in
> /home/interface/interface/oralib-12/lib/libclntsh.so.12.1)
>
> ==00:00:00:11.329 1533==Â Â Â by 0x7AC3F78: OCIStmtExecute (in
> /home/interface/interface/oralib-12/lib/libclntsh.so.12.1)
>
> ==00:00:00:11.329 1533==Â Â Â by 0x45078D: HS_do_OCI_stuff (HS_oci.c:1460)
>
> ==00:00:00:11.329 1533==Â Â Â by 0x407DA0: HS_send2HS (HS_thr_out.c:261)
>
> ==00:00:00:11.329 1533==Â Â Â by 0x4083BB: HS_convertandsend
> (HS_thr_out.c:468)
>
> ==00:00:00:11.329 1533==Â Â Â by 0x40884E: HS_out_msg (HS_thr_out.c:629)
>
> ==00:00:00:11.329 1533==Â Â Â by 0x40913C: HS_out_main (HS_thr_out.c:933)
>
> ==00:00:00:11.329 1533==Â Â Â by 0x409797: HS_main_out (HS_thr_out.c:1172)
>
> ==00:00:00:11.329 1533==Â Â Â by 0x9C50DD4: start_thread
> (pthread_create.c:307)
>
> ==00:00:00:11.329 1533==Â Uninitialised value was created by a stack
> allocation
>
> ==00:00:00:11.329 1533==Â Â Â at 0x407C67: HS_send2HS (HS_thr_out.c:231)
>
> ==00:00:00:11.329 1533==
>
> The problem with that report is that line 231 contains no explicit code:
>
> static HS_IF_STATE HS_send2HS (HS_out_thread * myoutthr,
>
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â HS_MSGBUF * msgbuf,
>
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â HS_IF_PARMS * ifparms,
>
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â xmlChar * xmlbufptr,
>
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â char * HS_resp,
>
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â HS_patdat * patdat,
>
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â char * databuf)
>
> { ç line 231
>
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â HS_IF_STATE status = OK;
>
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â int success, warnings;
>
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â int numtries = 0
>
> I canÂ’t find anything thatÂ’s allocated in that function that would be
> un-initialized later in the program, and I donÂ’t know what it thinks
> is on line 231.
>
> Advice will be appreciated, thanks in advance!
>
The allocation is probably in the function's stack frame, which would be
set up at function entry. The compiler probably assigned line 231 to
that task. I see line 261 in your call stack; what local variables does
it use?
--
David Chapman [email protected]
Chapman Consulting -- San Jose, CA
EDA Software Developer, Expert Witness
www.chapman-consulting-sj.com
2018-2019 Chair, IEEE Consultants' Network of Silicon Valley
_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users