Project

Profile

Help

HostedRedmine.com 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

closed

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

Added by Chippo Elder about 4 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Category:
gui-qt
Sprint/Milestone:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

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.


Files

Actions #1

Updated by Jacob Nevins about 4 years ago

I get the same.

Actions #2

Updated by Marko Lindqvist almost 4 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.

Actions #4

Updated by Chippo Elder almost 4 years ago

Marko Lindqvist wrote:

Does this patch help?

Yup. That error is gone.

Actions #5

Updated by Marko Lindqvist almost 4 years ago

  • Status changed from Resolved to Closed
  • Assignee set to Marko Lindqvist
Actions #6

Updated by Marko Lindqvist over 3 years ago

  • Sprint/Milestone changed from 2.6.3 to 2.6.2.1

Also available in: Atom PDF