unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* Undefined Behavior sanitizer findings
@ 2019-03-08  9:16 Jeffrey Walton
  2019-04-17  3:45 ` Mark H Weaver
  0 siblings, 1 reply; 2+ messages in thread
From: Jeffrey Walton @ 2019-03-08  9:16 UTC (permalink / raw)
  To: guile-devel

[-- Attachment #1: Type: text/plain, Size: 229 bytes --]

Hi Everyone,

Guile 2.2.4 built with -fsanitize=undefined on Fedora 29, x86_64.
'make check' is producing UBsan findings.

UBsan operates on real data. All of the findings are valid.

Search for 'runtime error' in the log.

Jeff

[-- Attachment #2: guile.test.txt.zip --]
[-- Type: application/octet-stream, Size: 52610 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Undefined Behavior sanitizer findings
  2019-03-08  9:16 Undefined Behavior sanitizer findings Jeffrey Walton
@ 2019-04-17  3:45 ` Mark H Weaver
  0 siblings, 0 replies; 2+ messages in thread
From: Mark H Weaver @ 2019-04-17  3:45 UTC (permalink / raw)
  To: Jeffrey Walton; +Cc: guile-devel

Hi Jeffrey,

Jeffrey Walton <noloader@gmail.com> writes:

> Guile 2.2.4 built with -fsanitize=undefined on Fedora 29, x86_64.
> 'make check' is producing UBsan findings.
>
> UBsan operates on real data. All of the findings are valid.
>
> Search for 'runtime error' in the log.

Thanks very much for this, and sorry for the long delay.  The log shows
four kinds of errors:

(1) bytevectors.c:665:3: runtime error: null pointer passed as argument 2, which is declared to never be null
(2) srfi-14.c:366:7: runtime error: null pointer passed as argument 2, which is declared to never be null
(3) strings.c:2292:3: runtime error: null pointer passed as argument 1, which is declared to never be null
(4) ../src/x86/ffi64.c:552:5: runtime error: store to misaligned address 0x7fab61c8e012 for type 'long long unsigned int', which requires 8 byte alignment

The first three are issues in libguile, which I have fixed in commit
6b1de860ab2360e8679205aecdc1c837744a4b9c on the stable-2.2 branch:

  https://git.savannah.gnu.org/cgit/guile.git/commit/?h=stable-2.2&id=6b1de860ab2360e8679205aecdc1c837744a4b9c

The last was an issue in libffi, in this code:

  https://github.com/libffi/libffi/blob/v3.2.1/src/x86/ffi64.c#L551

However, that code was completely rewritten, years ago, in this commit:

  https://github.com/libffi/libffi/commit/6b62fb4a26d7363548a92f1a156562cfa648726e

Please let us know if you see more issues like this in Guile.

     Regards,
       Mark



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-04-17  3:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-08  9:16 Undefined Behavior sanitizer findings Jeffrey Walton
2019-04-17  3:45 ` Mark H Weaver

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).