Help has moved to the Planio platform. All logins and passwords remained the same. All users will be able to login and use Redmine just as before. Read more...

Bug #863839

UBSan warnings about integer issues in chatline.cpp (S3_0, clang9)

Added by Chippo Elder about 2 years ago. Updated over 1 year ago.

Start date:
Due date:
% Done:


Estimated time:


I see the following errors in the qt client, after compiling with -fsanitize=undefined and clang9.

chatline.cpp:514:17: runtime error: inf is outside the range of representable values of type 'int'
chatline.cpp:518:16: runtime error: signed integer overflow: 3 * -2147483648 cannot be represented in type 'int'

I get the same 2 errors for every savegame that I've tried. You see it just after you connect to the server.


#1 Updated by Jacob Nevins about 2 years ago

I get the same.

#2 Updated by Marko Lindqvist about 2 years ago

  • Status changed from New to In Progress
  • Sprint/Milestone set to 2.6.3

I wondered if line_count would be zero in early calls, and adding some logging there shows that it is. That would mean division by zero there.

#4 Updated by Chippo Elder about 2 years ago

Marko Lindqvist wrote:

Does this patch help?

Yup. That error is gone.

#5 Updated by Marko Lindqvist about 2 years ago

  • Status changed from Resolved to Closed
  • Assignee set to Marko Lindqvist

#6 Updated by Marko Lindqvist over 1 year ago

  • Sprint/Milestone changed from 2.6.3 to

Also available in: Atom PDF