Hi Bruno,

At 2026-07-25T01:10:20+0200, Bruno Haible wrote:
> I tried building the groff-1.25.0.rc1 with clang's ASAN (usually
> better than gcc's ASAN) on a GNU system. For reference, I use these
> environment variables:
> $ make -k
>   GEN      doc/line-layout.eps
> ../src/roff/troff/dictionary.cpp:45:29: runtime error: left shift of 
> 72057594037927936 by 8 places cannot be represented in type 'ssize_t' (aka 
> 'long')
> SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior 
> ../src/roff/troff/dictionary.cpp:45:29 
> /build/groff-1.25.0.rc1/build-64-clang/groff: error: troff: Aborted
> make: *** [Makefile:20188: doc/line-layout.eps] Error 8
> 
> Signed integer overflow is undefined behaviour.
> 
> The attached patch fixes it for me.

Thanks!  I had not run into this one yet, and have been procrastinating
turning screws on GNU troff's `dictionary` class since it so obviously
screams for a direct STL replacement.

Regards,
Branden

Attachment: signature.asc
Description: PGP signature

  • ... Bruno Haible via discussion of the GNU roff typesetting system and related software
    • ... G. Branden Robinson

Reply via email to