<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>
GitLab
</title>


<style>img {
max-width: 100%; height: auto;
}
</style>
</head>
<body>
<div class="content">
<div></div>
<p dir="auto">I tracked down the failure of this test on Alpine (busybox+musl)... as is turns out the test relies on a special glibc behavior of abort(). Which is even the opposite of the documented behavior :-). One way to achieve a stable behavior would be to split the test into several smaller ones and avoiding <code>signal(SIGABRT, ...)</code>.</p>
<p dir="auto">The man page of Debian (libc 2.27) says</p>
<pre class="code highlight js-syntax-highlight plaintext" lang="plaintext" v-pre="true"><code><span id="LC1" class="line" lang="plaintext">If  the  SIGABRT  signal  is ignored, or caught by a handler that returns, the abort() function will still terminate the</span>
<span id="LC2" class="line" lang="plaintext">process.  It does this by restoring the default disposition for SIGABRT and then raising the signal for a second time.</span></code></pre>
<p dir="auto">But the test does the opposite by setting a signal handler for SIGABRT, assuming that the process doesn't abort in this case, e.g.</p>
<pre class="code highlight js-syntax-highlight plaintext" lang="plaintext" v-pre="true"><code><span id="LC1" class="line" lang="plaintext">  signal(SIGABRT, custom_abrt);                  </span>
<span id="LC2" class="line" lang="plaintext">  ret = gnutls_cipher_add_auth(ch, data, 16);</span>
<span id="LC3" class="line" lang="plaintext">  signal(SIGABRT, SIG_DFL);</span>
<span id="LC4" class="line" lang="plaintext">  if (ret >= 0 && error_detected == 0)</span>
<span id="LC5" class="line" lang="plaintext">    fail("succeeded in adding auth data data after partial data were given\n");</span></code></pre>
<p dir="auto">This seems to work with glibc 2.27 but can change with any new version.</p>

</div>
<div class="footer" style="margin-top: 10px;">
<p style="font-size: small; color: #777777;">

<br>
Reply to this email directly or <a href="https://gitlab.com/gnutls/gnutls/issues/623">view it on GitLab</a>.
<br>
You're receiving this email because of your account on gitlab.com.
If you'd like to receive fewer emails, you can
<a href="https://gitlab.com/sent_notifications/1b289a9a0cd277edca10054db679e801/unsubscribe">unsubscribe</a>
from this thread or
adjust your notification settings.
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","action":{"@type":"ViewAction","name":"View Issue","url":"https://gitlab.com/gnutls/gnutls/issues/623"}}</script>
</p>
</div>
</body>
</html>