URL:
<http://gna.org/bugs/?19074>
Summary: preprocessor gets confused by nested <<>>s
Project: Battle for Wesnoth
Submitted by: anonymissimus
Submitted on: Mo 28 Nov 2011 21:57:03 GMT
Category: Bug
Severity: 2 - Minor
Priority: 3 - Low
Item Group: None of the others
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: trunk r52129
Operating System: win xp
_______________________________________________________
Details:
Putting this
++
[lua]
code=<< --<<>>{ >>
[/lua]
--
into a scenario causes a message about unterminated macro substitution.
Adding a } directly after the { to terminate it causes segfault.
>From all what I know, the preprocessor should not do anything with what's
enclosed in << >>, notably not try to expand any {}s.
Low priority since I don't see the need for using nested <<>>s, I just
discovered it by chance.
Apparently the preprocessor doesn't store in a stack how many << it
encountered.
++
Program received signal SIGSEGV, Segmentation fault.
0x00d72295 in std::basic_string<char, std::char_traits<char>,
std::allocator<char> >::_Rep::_M_clone(std::allocator<char> const&, unsigned
int) ()
(gdb) bt
#0 0x00d72295 in std::basic_string<char, std::char_traits<char>,
std::allocator<char> >::_Rep::_M_clone(std::allocator<char> const&, unsigned
int) ()
#1 0x00d7394f in std::basic_string<char, std::char_traits<char>,
std::allocator<char> >::basic_string(std::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&) ()
#2 0x0090524a in preprocessor_data::get_chunk (this=0x1170faf8) at
C:\wesnoth\src\serialization\preprocessor.cpp:994
#3 0x0090054e in preprocessor_streambuf::underflow (this=0x1170c208) at
C:\wesnoth\src\serialization\preprocessor.cpp:306
#4 0x00dbd626 in std::basic_streambuf<char, std::char_traits<char>
>::uflow() ()
#5 0x00d6ca4e in std::basic_istream<char, std::char_traits<char> >::get()
()
#6 0x00cd6cec in tokenizer::next_char_fast (this=0x1170f288) at
../../src/serialization/tokenizer.hpp:109
#7 0x00911714 in tokenizer::next_token (this=0x1170f288) at
C:\wesnoth\src\serialization\tokenizer.cpp:147
#8 0x008f7ba7 in (anonymous namespace)::parser::operator() (this=0x22eeac)
at C:\wesnoth\src\serialization\parser.cpp:109
#9 0x008fad8a in read (cfg=..., in=..., validator=0x0) at
C:\wesnoth\src\serialization\parser.cpp:374
#10 0x00542ed2 in game_config::config_cache::read_configs (this=0x1170bd8,
path=..., cfg=..., defines_map=...) at C:\wesnoth\src\config_cache.cpp:154
#11 0x005439e9 in game_config::config_cache::read_cache (this=0x1170bd8,
path=..., cfg=...) at C:\wesnoth\src\config_cache.cpp:233
#12 0x00544c36 in game_config::config_cache::load_configs (this=0x1170bd8,
path=..., cfg=...) at C:\wesnoth\src\config_cache.cpp:285
#13 0x00542801 in game_config::config_cache::get_config (this=0x1170bd8,
path=..., cfg=...) at C:\wesnoth\src\config_cache.cpp:91
#14 0x005f4db7 in game_controller::load_game_cfg (this=0xe65ebd8,
force=false) at C:\wesnoth\src\game_controller.cpp:1178
#15 0x005f6a82 in game_controller::launch_game (this=0xe65ebd8,
reload=game_controller_abstract::RELOAD_DATA) at
C:\wesnoth\src\game_controller.cpp:1256
#16 0x005decf6 in do_gameloop (argc=2, argv=0xe656138) at
C:\wesnoth\src\game.cpp:577
#17 0x005df574 in SDL_main (argc=2, argv=0xe656138) at
C:\wesnoth\src\game.cpp:636
#18 0x00a429db in console_main (argc=2, argv=0xe656138) at
./src/main/win32/SDL_win32_main.c:315
#19 0x00a42a98 in WinMain (hInst=0x400000, hPrev=0x0, szCmdLine=0x241eff
"-d", sw=10) at ./src/main/win32/SDL_win32_main.c:398
#20 0x00a42156 in main ()
--
_______________________________________________________
Reply to this item at:
<http://gna.org/bugs/?19074>
_______________________________________________
Nachricht geschickt von/durch Gna!
http://gna.org/
_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs