Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006430OCamlOCaml runtime systempublic2014-05-17 23:522014-05-19 14:42
Reporterwhitequark 
Assigned Tolpw25 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusresolvedResolutionno change required 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0006430: Running clang-analyzer on OCaml runtime finds bugs
DescriptionThe results are available here: http://fehu.whitequark.org/files/scan-build-2014-05-18-10/ [^]

Preliminary analysis:

Bug:
  * yacc/reader.c:1667 http://fehu.whitequark.org/files/scan-build-2014-05-18-10/report-LhFUhx.html#EndPath [^]
  * yacc/mkpar.c:238 http://fehu.whitequark.org/files/scan-build-2014-05-18-10/report-HKV0Dz.html#EndPath [^]
  * otherlibs/unix/wait.c:70 http://fehu.whitequark.org/files/scan-build-2014-05-18-10/report-47JGcK.html#EndPath [^]

Possible bug:
  * byterun/globroots.c:98 http://fehu.whitequark.org/files/scan-build-2014-05-18-10/report-hKAbzv.html#EndPath [^]
  * otherlibs/bigarray/bigarray_stubs.c:224 http://fehu.whitequark.org/files/scan-build-2014-05-18-10/report-Z0yhYS.html#EndPath [^]

Benign:
  * byterun/array.c:336 http://fehu.whitequark.org/files/scan-build-2014-05-18-10/report-xXYQd1.html#EndPath [^]
  * yacc/reader.c:922 http://fehu.whitequark.org/files/scan-build-2014-05-18-10/report-sKbiUS.html#EndPath [^]
  * yacc/closure.c:139 http://fehu.whitequark.org/files/scan-build-2014-05-18-10/report-P3LKlv.html#EndPath [^]
  * yacc/closure.c:111 http://fehu.whitequark.org/files/scan-build-2014-05-18-10/report-sDHTtn.html#EndPath [^]
  * yacc/main.c:342-345 http://fehu.whitequark.org/files/scan-build-2014-05-18-10/report-jexafd.html#EndPath [^]
  * yacc/reader.c:1328 http://fehu.whitequark.org/files/scan-build-2014-05-18-10/report-lHUz5c.html#EndPath [^]

False positive:
  * asmrun/signals_asm.c:286 http://fehu.whitequark.org/files/scan-build-2014-05-18-10/report-mmEXBN.html#EndPath [^]
  * otherlibs/graph/color.c:92 http://fehu.whitequark.org/files/scan-build-2014-05-18-10/report-eYdns3.html#EndPath [^]
Steps To ReproduceUse the trunk compiler with added Noreturn qualifiers: https://github.com/ocaml/ocaml/pull/64 [^] This reduces false positives.

Install clang-analyzer.

Build it as follows:

   scan-build ./configure -cc /usr/share/clang/scan-build/ccc-analyzer
   scan-build make clean world world.opt
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0011513)
whitequark (reporter)
2014-05-17 23:59

On a second look, yacc/mkpar.c:238 is a false positive.
(0011514)
lpw25 (developer)
2014-05-18 11:05
edited on: 2014-05-18 11:06

I could be wrong but otherlibs/unix/wait.c and yacc/reader.c both look like false positives/benign to me.

(0011519)
xleroy (administrator)
2014-05-19 11:59

I, too, found wait.c to be a false alarm. So, in the end, do we have true alarms in there?
(0011520)
whitequark (reporter)
2014-05-19 12:04

I have reviewed all of the cases, including "Possible bug" ones, and now I agree with you. Indeed, this issue can be closed.

- Issue History
Date Modified Username Field Change
2014-05-17 23:52 whitequark New Issue
2014-05-17 23:59 whitequark Note Added: 0011513
2014-05-18 11:05 lpw25 Note Added: 0011514
2014-05-18 11:06 lpw25 Note Edited: 0011514 View Revisions
2014-05-19 11:59 xleroy Note Added: 0011519
2014-05-19 11:59 xleroy Status new => feedback
2014-05-19 12:04 whitequark Note Added: 0011520
2014-05-19 12:04 whitequark Status feedback => new
2014-05-19 14:42 lpw25 Status new => resolved
2014-05-19 14:42 lpw25 Resolution open => no change required
2014-05-19 14:42 lpw25 Assigned To => lpw25


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker