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

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

Added by Chippo Elder 11 months ago. Updated 2 months 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.

History

#1 Updated by Jacob Nevins 11 months ago

I get the same.

#2 Updated by Marko Lindqvist 9 months 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 9 months ago

Marko Lindqvist wrote:

Does this patch help?

Yup. That error is gone.

#5 Updated by Marko Lindqvist 9 months ago

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

#6 Updated by Marko Lindqvist 2 months ago

  • Sprint/Milestone changed from 2.6.3 to 2.6.2.1

Also available in: Atom PDF