From a61e4bc35f25bc361cde5a973334424c0c1fc5bf Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Tue, 23 Oct 2012 12:04:41 +0200 Subject: open_issues/code_analysis: Splint. --- open_issues/code_analysis.mdwn | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'open_issues/code_analysis.mdwn') diff --git a/open_issues/code_analysis.mdwn b/open_issues/code_analysis.mdwn index 00915651..f81af06e 100644 --- a/open_issues/code_analysis.mdwn +++ b/open_issues/code_analysis.mdwn @@ -85,6 +85,14 @@ There is a [[!FF_project 276]][[!tag bounty]] on some of these tasks. * [Coverity](http://www.coverity.com/) (nonfree?) + * [Splint](http://www.splint.org/) + + * IRC, freenode, #hurd, 2011-12-04 + + has anyone used splint on hurd? + this is tool for statically checking C programs + seems I made it work + # Dynamic -- cgit v1.2.3 From 684f2997381cbcfc4f2bd66726f271fa30ca835c Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Fri, 26 Oct 2012 18:48:42 +0200 Subject: open_issues/code_analysis: glibc's libmcheck. --- open_issues/code_analysis.mdwn | 7 +++++++ shortcuts.mdwn | 6 ++++++ 2 files changed, 13 insertions(+) (limited to 'open_issues/code_analysis.mdwn') diff --git a/open_issues/code_analysis.mdwn b/open_issues/code_analysis.mdwn index f81af06e..4702fce6 100644 --- a/open_issues/code_analysis.mdwn +++ b/open_issues/code_analysis.mdwn @@ -98,6 +98,13 @@ There is a [[!FF_project 276]][[!tag bounty]] on some of these tasks. * [[community/gsoc/project_ideas/Valgrind]] + * glibc's `libmcheck` + + * Used by GDB, for example. + + * Is not thread-safe, [[!sourceware_bug 6547]], [[!sourceware_bug 9939]], + [[!sourceware_bug 12751]], [[!stackoverflow_question 314931]]. + * * diff --git a/shortcuts.mdwn b/shortcuts.mdwn index 5afa106e..439caf33 100644 --- a/shortcuts.mdwn +++ b/shortcuts.mdwn @@ -104,3 +104,9 @@ ikiwiki will include your shortcut in the standard underlay. * [[!shortcut name=sourceware_bug url="http://sourceware.org/bugzilla/show_bug.cgi?id=%s" desc="sourceware.org bug #%s"]] + +## + + * [[!shortcut name=stackoverflow_question + url="http://http://stackoverflow.com/questions/%s" + desc="Stack Overflow question %s"]] -- cgit v1.2.3 From 562782408dd69798f60fd9d343b8f51f56ba2600 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Wed, 21 Nov 2012 10:23:44 +0100 Subject: open_issues/code_analysis: s-spider. --- open_issues/code_analysis.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'open_issues/code_analysis.mdwn') diff --git a/open_issues/code_analysis.mdwn b/open_issues/code_analysis.mdwn index 00915651..9089eea4 100644 --- a/open_issues/code_analysis.mdwn +++ b/open_issues/code_analysis.mdwn @@ -83,6 +83,8 @@ There is a [[!FF_project 276]][[!tag bounty]] on some of these tasks. * [sixgill](http://sixgill.org/) + * [s-spider](http://code.google.com/p/s-spider/) + * [Coverity](http://www.coverity.com/) (nonfree?) -- cgit v1.2.3 From 61ce0487a68560c58367d3a82f30ab00345cd72f Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Wed, 21 Nov 2012 10:38:04 +0100 Subject: open_issues/code_analysis: GCC's AddressSanitizer. --- open_issues/code_analysis.mdwn | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'open_issues/code_analysis.mdwn') diff --git a/open_issues/code_analysis.mdwn b/open_issues/code_analysis.mdwn index 9089eea4..a7a7031a 100644 --- a/open_issues/code_analysis.mdwn +++ b/open_issues/code_analysis.mdwn @@ -127,6 +127,12 @@ There is a [[!FF_project 276]][[!tag bounty]] on some of these tasks. ah, no, the libthreads code properly sets the guard, just for grow-up stacks + * GCC's AddressSanitizer (ASan; `-faddress-sanitizer`) + + [Finding races and memory errors with GCC instrumentation + (AddressSanitizer)](http://gcc.gnu.org/wiki/cauldron2012#Finding_races_and_memory_errors_with_GCC_instrumentation_.28AddressSanitizer.29), + GNU Tools Cauldron 2012. + * Input fuzzing Not a new topic; has been used (and a paper published) for early UNIX -- cgit v1.2.3 From 5cc8714e4af82bec2ad7ea2d2479016e5a74de9b Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Tue, 27 Nov 2012 17:46:59 +0100 Subject: open_issues/code_analysis: Add some more references. Engineering zero-defect software by Eric S. Raymond, CIL, Frama-C. --- open_issues/code_analysis.mdwn | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'open_issues/code_analysis.mdwn') diff --git a/open_issues/code_analysis.mdwn b/open_issues/code_analysis.mdwn index a7a7031a..fd8a36de 100644 --- a/open_issues/code_analysis.mdwn +++ b/open_issues/code_analysis.mdwn @@ -42,10 +42,13 @@ There is a [[!FF_project 276]][[!tag bounty]] on some of these tasks. "1123688017.3905.22.camel@buko.sinrega.org"]]. This could be checked by a static analysis tool. - * [Static Source Code Analysis Tools for C](http://spinroot.com/static/) - * [[!wikipedia List_of_tools_for_static_code_analysis]] + * [Engineering zero-defect software](http://esr.ibiblio.org/?p=4340), Eric + S. Raymond, 2012-05-13 + + * [Static Source Code Analysis Tools for C](http://spinroot.com/static/) + * [Cppcheck](http://sourceforge.net/apps/mediawiki/cppcheck/) For example, [Debian's hurd_20110319-2 @@ -59,13 +62,9 @@ There is a [[!FF_project 276]][[!tag bounty]] on some of these tasks. * - * clang + * [clang](http://www.google.com/search?q=clang+analysis) - * - - * Linux' sparse - - * + * [Linux' sparse](https://sparse.wiki.kernel.org/) * @@ -85,6 +84,10 @@ There is a [[!FF_project 276]][[!tag bounty]] on some of these tasks. * [s-spider](http://code.google.com/p/s-spider/) + * [CIL (C Intermediate Language)](http://kerneis.github.com/cil/) + + * [Frama-C](http://frama-c.com/) + * [Coverity](http://www.coverity.com/) (nonfree?) -- cgit v1.2.3 From ae1cc0d932c8bb939fa2037e6183c1ce8f550942 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Tue, 27 Nov 2012 22:30:22 +0100 Subject: open_issues/code_analysis: MALLOC_CHECK_, MALLOC_PERTURB_. --- open_issues/code_analysis.mdwn | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) (limited to 'open_issues/code_analysis.mdwn') diff --git a/open_issues/code_analysis.mdwn b/open_issues/code_analysis.mdwn index fd8a36de..b3908243 100644 --- a/open_issues/code_analysis.mdwn +++ b/open_issues/code_analysis.mdwn @@ -103,18 +103,25 @@ There is a [[!FF_project 276]][[!tag bounty]] on some of these tasks. * - * IRC, freenode, #glibc, 2011-09-28 - - two things you can do -- there is an environment variable - (DEBUG_MALLOC_ iirc?) that can be set to 2 to make ptmalloc (glibc's - allocator) more forceful and verbose wrt error checking - another is to grab a copy of Tor's source tree and copy out - OpenBSD's allocator (its a clearly-identifyable file in the tree); - LD_PRELOAD it or link it into your app, it is even more aggressive - about detecting memory misuse. - third, Red hat has a gdb python plugin that can instrument - glibc's heap structure. its kinda handy, might help? - MALLOC_CHECK_ was the envvar you want, sorry. + * `MALLOC_CHECK_`/`MALLOC_PERTURB_` + + * IRC, freenode, #glibc, 2011-09-28 + + two things you can do -- there is an environment + variable (DEBUG_MALLOC_ iirc?) that can be set to 2 to make + ptmalloc (glibc's allocator) more forceful and verbose wrt error + checking + another is to grab a copy of Tor's source tree and copy + out OpenBSD's allocator (its a clearly-identifyable file in the + tree); LD_PRELOAD it or link it into your app, it is even more + aggressive about detecting memory misuse. + third, Red hat has a gdb python plugin that can + instrument glibc's heap structure. its kinda handy, might help? + MALLOC_CHECK_ was the envvar you want, sorry. + + * [`MALLOC_PERTURB_`](http://udrepper.livejournal.com/11429.html) + + * * In context of [[!message-id "1341350006-2499-1-git-send-email-rbraun@sceen.net"]]/the `alloca` issue -- cgit v1.2.3 From d67f6589bf710235ad56731c4c06a75cfad75462 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Fri, 14 Dec 2012 11:32:23 +0100 Subject: open_issues/gcc: a1d48e100791bc67ff355e0931a604e767c827b7 (2012-12-10; be3860ba8df48cca3253da4f02fd2d42d856ce80 (2012-12-10)) --- community/gsoc/project_ideas.mdwn | 5 +- community/gsoc/project_ideas/gcc_asan.mdwn | 21 ++++ .../automatic_backtraces_when_assertions_hit.mdwn | 2 +- open_issues/boehm_gc.mdwn | 2 - open_issues/code_analysis.mdwn | 13 ++- open_issues/formal_verification.mdwn | 5 +- open_issues/gcc.mdwn | 120 +++++++++++++-------- toolchain/logs | 2 +- 8 files changed, 114 insertions(+), 56 deletions(-) create mode 100644 community/gsoc/project_ideas/gcc_asan.mdwn (limited to 'open_issues/code_analysis.mdwn') diff --git a/community/gsoc/project_ideas.mdwn b/community/gsoc/project_ideas.mdwn index 8ce10ffa..b85087ad 100644 --- a/community/gsoc/project_ideas.mdwn +++ b/community/gsoc/project_ideas.mdwn @@ -1,5 +1,5 @@ -[[!meta copyright="Copyright © 2008, 2009, 2010, 2011 Free Software Foundation, -Inc."]] +[[!meta copyright="Copyright © 2008, 2009, 2010, 2011, 2012 Free Software +Foundation, Inc."]] [[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable id="license" text="Permission is granted to copy, distribute and/or modify this @@ -109,6 +109,7 @@ other: language_bindings, gnat, gccgo, perl_python. --> [[!inline pages="community/gsoc/project_ideas/libcap" show=0 feeds=no actions=yes]] [[!inline pages="community/gsoc/project_ideas/xattr" show=0 feeds=no actions=yes]] [[!inline pages="community/gsoc/project_ideas/valgrind" show=0 feeds=no actions=yes]] +[[!inline pages="community/gsoc/project_ideas/gcc_asan" show=0 feeds=no actions=yes]] [[!inline pages="community/gsoc/project_ideas/driver_glue_code" show=0 feeds=no actions=yes]] [[!inline pages="community/gsoc/project_ideas/dtrace" show=0 feeds=no actions=yes]] [[!inline pages="community/gsoc/project_ideas/libdiskfs_locking" show=0 feeds=no actions=yes]] diff --git a/community/gsoc/project_ideas/gcc_asan.mdwn b/community/gsoc/project_ideas/gcc_asan.mdwn new file mode 100644 index 00000000..229c46ec --- /dev/null +++ b/community/gsoc/project_ideas/gcc_asan.mdwn @@ -0,0 +1,21 @@ +[[!meta copyright="Copyright © 2012 Free Software Foundation, Inc."]] + +[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable +id="license" text="Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation License, Version 1.2 or +any later version published by the Free Software Foundation; with no Invariant +Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license +is included in the section entitled [[GNU Free Documentation +License|/fdl]]."]]"""]] + +[[!meta title="Port GCC's AddressSanitizer to the Hurd"]] + +[[!tag open_issue_gcc]] + +See the entry on the [[open_issues/code_analysis]] page. + +See also the [[valgrind]] task. + +A follow-up project is porting GCC's ThreadSanitizer. + +Possible mentors: Thomas Schwinge (tschwinge) diff --git a/open_issues/automatic_backtraces_when_assertions_hit.mdwn b/open_issues/automatic_backtraces_when_assertions_hit.mdwn index f6bf5856..df7294e9 100644 --- a/open_issues/automatic_backtraces_when_assertions_hit.mdwn +++ b/open_issues/automatic_backtraces_when_assertions_hit.mdwn @@ -76,4 +76,4 @@ In context of the [[ext2fs_libports_reference_counting_assertion]]. # GCC's libbacktrace -Introduced in commit ecd3459e7bb829202601e3274411135a15c64dde. +Introduced in GCC commit ecd3459e7bb829202601e3274411135a15c64dde. diff --git a/open_issues/boehm_gc.mdwn b/open_issues/boehm_gc.mdwn index 6ab39b2e..7f860bba 100644 --- a/open_issues/boehm_gc.mdwn +++ b/open_issues/boehm_gc.mdwn @@ -359,8 +359,6 @@ restults of GNU/Linux and GNU/Hurd look very similar. # TODO - * Port stuff to [[GCC]], and test it there. - * What are other applications to test Boehm GC? Also especially in combination with [[/libpthread]] and dynamic loading of shared libraries? diff --git a/open_issues/code_analysis.mdwn b/open_issues/code_analysis.mdwn index b3908243..8c604e3f 100644 --- a/open_issues/code_analysis.mdwn +++ b/open_issues/code_analysis.mdwn @@ -137,11 +137,20 @@ There is a [[!FF_project 276]][[!tag bounty]] on some of these tasks. ah, no, the libthreads code properly sets the guard, just for grow-up stacks - * GCC's AddressSanitizer (ASan; `-faddress-sanitizer`) + * GCC's AddressSanitizer, a memory error detector (ASan; + `-fsanitize=address`) [Finding races and memory errors with GCC instrumentation (AddressSanitizer)](http://gcc.gnu.org/wiki/cauldron2012#Finding_races_and_memory_errors_with_GCC_instrumentation_.28AddressSanitizer.29), - GNU Tools Cauldron 2012. + GNU Tools Cauldron 2012. . + + Not yet [[ported to the Hurd|community/gsoc/project_ideas/gcc_asan]]. + + * GCC's ThreadSanitizer, a data race detector (TSan; `-fsanitize=thread`) + + + + Not yet [[ported to the Hurd|community/gsoc/project_ideas/gcc_asan]]. * Input fuzzing diff --git a/open_issues/formal_verification.mdwn b/open_issues/formal_verification.mdwn index b7db76ee..474670c3 100644 --- a/open_issues/formal_verification.mdwn +++ b/open_issues/formal_verification.mdwn @@ -1,4 +1,5 @@ -[[!meta copyright="Copyright © 2010, 2011 Free Software Foundation, Inc."]] +[[!meta copyright="Copyright © 2010, 2011, 2012 Free Software Foundation, +Inc."]] [[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable id="license" text="Permission is granted to copy, distribute and/or modify this @@ -15,6 +16,8 @@ Especially in the field of [[DSL]]s, this is used for asserting program codes' correctness, as explained in {{$microkernel/barrelfish#fof_plos09}}, for example. +See also [[code_analysis]]. + [[!toc]] diff --git a/open_issues/gcc.mdwn b/open_issues/gcc.mdwn index 574a743b..f5022c16 100644 --- a/open_issues/gcc.mdwn +++ b/open_issues/gcc.mdwn @@ -33,12 +33,12 @@ example. Especially all the compiler magic is all the same. git checkout reviewed git log --reverse --topo-order --pretty=fuller --stat=$COLUMNS,$COLUMNS -w -p -C --cc ..upstream/trunk -i -/^commit |^Merge:|^---$|hurd|linux|nacl|nptl|glibc|gs: +/^commit |^merge:|^---$|hurd|linux|nacl|nptl|glibc|gs: --> -Last reviewed up to the [[Git mirror's 769bf18a20ee2540ca7601cdafabd62b18b9751b -(2012-10-01) sources|source_repositories/gcc]]. +Last reviewed up to the [[Git mirror's be3860ba8df48cca3253da4f02fd2d42d856ce80 +(2012-12-10) sources|source_repositories/gcc]]. has documentation for the `configure` switches. @@ -301,12 +301,39 @@ Last reviewed up to the [[Git mirror's 769bf18a20ee2540ca7601cdafabd62b18b9751b "20110609002620.GA16719@const.famille.thibault.fr"]]. commit 026e608ecebcb2a6193971006a85276307d79b00. + * 549e2197b118efb2d947aaa15d445b05c1b5ed62 `Import the asan runtime library + into GCC tree`. Linux-specific things: + `ASAN_USE_ALIAS_ATTRIBUTE_FOR_INDEX`, `ASAN_LINUX`, `ASAN_POSIX`, + `libsanitizer/asan/asan_linux.cc`, + `libsanitizer/asan/asan_malloc_linux.cc`, + `libsanitizer/asan/asan_posix.cc`, + `libsanitizer/interception/interception.h`, + `libsanitizer/interception/interception_linux.cc`, + `libsanitizer/interception/interception_linux.h`, + `libsanitizer/sanitizer_common/sanitizer_allocator.cc`, + `libsanitizer/sanitizer_common/sanitizer_linux.cc`, + `libsanitizer/sanitizer_common/sanitizer_posix.cc`, + `libsanitizer/sanitizer_common/sanitizer_procmaps.h`, + `libsanitizer/sanitizer_common/sanitizer_symbolizer_linux.cc`. + 4afab99bf0fe2d6905a9fa9d6ab886ca102312df `Enable libsanitizer just on x86 + linux for now`. 492e75a7336b4dbfe38207ea3abf8d5bd72376a9 `Move + libsanitizer configure logic to subdirectory`. + 6aea389d84c2172668af5f108e2b17e131120d0b `Add STATIC_LIBASAN_LIBS for + -static-libasan`. Further commits later on. + + * 9cf754572854d9d9cd43c277eb7afb12e4911358 `Import tsan runtime from + llvm`. Linux-specific things: `libsanitizer/tsan/tsan_platform.h`, + `libsanitizer/tsan/tsan_platform_linux.cc`, + `libsanitizer/tsan/tsan_symbolize_addr2line_linux.cc`. + a96132f29aa3dfe94141a87537f62ea73ce0fc19 `Set TSAN_SUPPORTED=yes for + x86_64/i686-linux for 64-bit multilib`. Further commits later on. + # Build Here's a log of a GCC build run; this is from our [[Git repository's -b401cb7ed15602d244a6807835b0b9d740a302a8 (2012-11-26; -769bf18a20ee2540ca7601cdafabd62b18b9751b (2012-10-01)) +a1d48e100791bc67ff355e0931a604e767c827b7 (2012-12-10; +be3860ba8df48cca3253da4f02fd2d42d856ce80 (2012-12-10)) sources|source_repositories/gcc]], run on kepler.SCHWINGE and coulomb.SCHWINGE. $ export LC_ALL=C @@ -319,8 +346,8 @@ sources|source_repositories/gcc]], run on kepler.SCHWINGE and coulomb.SCHWINGE. Different hosts may default to different shells and compiler versions; thus harmonized. -This takes up around 3.1 GiB, and needs roughly 3.25 h on kepler.SCHWINGE and -13.25 h on coulomb.SCHWINGE. +This takes up around 3.5 GiB, and needs roughly 3.25 h on kepler.SCHWINGE and +14.25 h on coulomb.SCHWINGE.