<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/glib.git/tests/assert-msg-test.c, branch pgriffis/wip/resolver-https</title>
<subtitle>gitlab.gnome.org: GNOME/glib.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glib.git/'/>
<entry>
<title>Normalize C source files to end with exactly one newline</title>
<updated>2020-06-10T08:48:02+00:00</updated>
<author>
<name>Simon McVittie</name>
<email>smcv@collabora.com</email>
</author>
<published>2020-04-21T13:46:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glib.git/commit/?id=44c004c84e9080040ff4e0e90b322dda0561cf85'/>
<id>44c004c84e9080040ff4e0e90b322dda0561cf85</id>
<content type='text'>
Some editors automatically remove trailing blank lines, or
automatically add a trailing newline to avoid having a trailing
non-blank line that is not terminated by a newline. To avoid unrelated
whitespace changes when users of such editors contribute to GLib,
let's pre-emptively normalize all files.

Unlike more intrusive whitespace normalization like removing trailing
whitespace from each line, this seems unlikely to cause significant
issues with cherry-picking changes to stable branches.

Implemented by:

    find . -name '*.[ch]' -print0 | \
    xargs -0 perl -0777 -p -i -e 's/\n+\z//g; s/\z/\n/g'

Signed-off-by: Simon McVittie &lt;smcv@collabora.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some editors automatically remove trailing blank lines, or
automatically add a trailing newline to avoid having a trailing
non-blank line that is not terminated by a newline. To avoid unrelated
whitespace changes when users of such editors contribute to GLib,
let's pre-emptively normalize all files.

Unlike more intrusive whitespace normalization like removing trailing
whitespace from each line, this seems unlikely to cause significant
issues with cherry-picking changes to stable branches.

Implemented by:

    find . -name '*.[ch]' -print0 | \
    xargs -0 perl -0777 -p -i -e 's/\n+\z//g; s/\z/\n/g'

Signed-off-by: Simon McVittie &lt;smcv@collabora.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Use (void) for no parameters, not ()</title>
<updated>2012-11-02T00:12:02+00:00</updated>
<author>
<name>Colin Walters</name>
<email>walters@verbum.org</email>
</author>
<published>2012-11-01T23:36:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glib.git/commit/?id=8e59d8602ca5921d78245f5d2b405b517a5e7cf9'/>
<id>8e59d8602ca5921d78245f5d2b405b517a5e7cf9</id>
<content type='text'>
This ensures we build with -Werror=missing-parameter-type.

https://bugzilla.gnome.org/show_bug.cgi?id=687385
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This ensures we build with -Werror=missing-parameter-type.

https://bugzilla.gnome.org/show_bug.cgi?id=687385
</pre>
</div>
</content>
</entry>
<entry>
<title>Support storing assertion messages into core dump</title>
<updated>2009-12-23T15:51:11+00:00</updated>
<author>
<name>Martin Pitt</name>
<email>martin.pitt@ubuntu.com</email>
</author>
<published>2009-12-22T10:09:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/glib.git/commit/?id=da66897950431870390f8dc3f798e24f23ffb8c8'/>
<id>da66897950431870390f8dc3f798e24f23ffb8c8</id>
<content type='text'>
Crash interception/debugging systems like Apport or ABRT capture core dumps for
later crash analysis. However, if a program exits with an assertion failure,
the core dump is not useful since the assertion message is only printed to
stderr.

glibc recently got a patch which stores the message of assert() into the
__abort_msg global variable.
(http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=48dcd0ba)
That works fine for programs which actually use the standard C assert() macro.

This patch adds the same functionality for glib's assertion tests. If we are
building against a glibc which already has __abort_msg (2.11 and later, or
backported above git commit), use that, otherwise put it into our own field
__glib_assert_msg.

Usage:

  $ cat test.c
  #include &lt;glib.h&gt;

  int main() {
      g_assert(1 &lt; 0);
      return 0;
  }

  $ ./test
  **ERROR:test.c:5:main: assertion failed: (1 &lt; 0)
  Aborted (Core dumped)

  $ gdb --batch --ex 'print (char*) __abort_msg' ./test core
  [...]
  $1 = 0x93bf028 "ERROR:test.c:5:main: assertion failed: (1 &lt; 0)"

https://bugzilla.gnome.org/show_bug.cgi?id=594872
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Crash interception/debugging systems like Apport or ABRT capture core dumps for
later crash analysis. However, if a program exits with an assertion failure,
the core dump is not useful since the assertion message is only printed to
stderr.

glibc recently got a patch which stores the message of assert() into the
__abort_msg global variable.
(http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=48dcd0ba)
That works fine for programs which actually use the standard C assert() macro.

This patch adds the same functionality for glib's assertion tests. If we are
building against a glibc which already has __abort_msg (2.11 and later, or
backported above git commit), use that, otherwise put it into our own field
__glib_assert_msg.

Usage:

  $ cat test.c
  #include &lt;glib.h&gt;

  int main() {
      g_assert(1 &lt; 0);
      return 0;
  }

  $ ./test
  **ERROR:test.c:5:main: assertion failed: (1 &lt; 0)
  Aborted (Core dumped)

  $ gdb --batch --ex 'print (char*) __abort_msg' ./test core
  [...]
  $1 = 0x93bf028 "ERROR:test.c:5:main: assertion failed: (1 &lt; 0)"

https://bugzilla.gnome.org/show_bug.cgi?id=594872
</pre>
</div>
</content>
</entry>
</feed>
