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...":https://support.plan.io/news/187

Bug #889511

closed

gcc-10: lua-5.3 luaS_newlstr() compile error

Added by Marko Lindqvist over 2 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Category:
General
Sprint/Milestone:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

Noticed when working on Feature #889425, but also reproduced with lua-5.3.5 currently in S2_6 and S3_0 heads. When building with included lua (--disable-sys-lua, or lua lacking from system), gcc10 gives:

In function ‘createstrobj’,
inlined from ‘luaS_createlngstrobj’ at ../../../../../src/dependencies/lua-5.3/src/lstring.c:148:17,
inlined from ‘luaS_newlstr’ at ../../../../../src/dependencies/lua-5.3/src/lstring.c:206:10:
../../../../../src/dependencies/lua-5.3/src/lstring.c:142:17: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
142 | getstr(ts)[l] = '\0'; /* ending 0 */
In file included from ../../../../../src/dependencies/lua-5.3/src/ldebug.h:11,
from ../../../../../src/dependencies/lua-5.3/src/lstring.c:17:
../../../../../src/dependencies/lua-5.3/src/lstring.c: In function ‘luaS_newlstr’:
../../../../../src/dependencies/lua-5.3/src/lstate.h:213:18: note: at offset 0 to object ‘ts’ with size 24 declared here
213 | struct TString ts; | ^~


Files


Related issues

Related to Freeciv - Feature #889425: Lua-5.3.6ClosedMarko Lindqvist

Actions
Actions #1

Updated by Marko Lindqvist over 2 years ago

Actions #3

Updated by Marko Lindqvist over 2 years ago

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

Updated by Marko Lindqvist over 2 years ago

  • Sprint/Milestone changed from 2.6.3 to 2.6.2.1

Also available in: Atom PDF