www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - compiler segfault: long identifier

reply Thomas Kuehne <thomas-dloop kuehne.cn> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

#
# int <a_very_long_identifers>;
#

starting program: /opt/dmd/147/dmd/bin/dmd -I/opt/dmd/147/dmd/src/phobos/ -c
bug.d

Program received signal SIGSEGV, Segmentation fault.
0x556aa067 in strcpy () from /lib32/libc.so.6
(gdb) bt -10
#713 0x6f746572 in ?? ()
#714 0x65746e69 in ?? ()
#715 0x74636172 in ?? ()
#716 0x68746977 in ?? ()
#717 0x65766573 in ?? ()
#718 0x706c6172 in ?? ()
#719 0x6c706f65 in ?? ()
#720 0x464c457f in ?? ()
#721 0x00010101 in ?? ()
#722 0x00000000 in ?? ()
(gdb) bt 10
#0  0x556aa067 in strcpy () from /lib32/libc.so.6
#1  0x08090382 in obj_mangle ()
#2  0x0808e75a in elf_addmangled ()
#3  0x5331326e in ?? ()
#4  0x65746174 in ?? ()
#5  0x746e656d in ?? ()
#6  0x56323273 in ?? ()
#7  0x61697261 in ?? ()
#8  0x44656c62 in ?? ()
#9  0x616c6365 in ?? ()
(More stack frames follow...)

Added to DStress as
http://dstress.kuehne.cn/run/l/large_id_01_A.d
http://dstress.kuehne.cn/run/l/large_id_01_B.d

Thomas


-----BEGIN PGP SIGNATURE-----

iD8DBQFEAB3S3w+/yD4P9tIRAmIvAJ9csszdBavYR+JeVt3fw2/X7gSYFACgqWdz
xKt9oe8+L/8dCr6XH3fCt6o=
=6mcw
-----END PGP SIGNATURE-----
Feb 25 2006
parent reply Wang Zhen <nehzgnaw gmail.com> writes:
Thomas Kuehne wrote:
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
 #
 # int <a_very_long_identifers>;
 #
 
 starting program: /opt/dmd/147/dmd/bin/dmd -I/opt/dmd/147/dmd/src/phobos/ -c
bug.d
 
 Program received signal SIGSEGV, Segmentation fault.
 0x556aa067 in strcpy () from /lib32/libc.so.6
 (gdb) bt -10
 #713 0x6f746572 in ?? ()
 #714 0x65746e69 in ?? ()
 #715 0x74636172 in ?? ()
 #716 0x68746977 in ?? ()
 #717 0x65766573 in ?? ()
 #718 0x706c6172 in ?? ()
 #719 0x6c706f65 in ?? ()
 #720 0x464c457f in ?? ()
 #721 0x00010101 in ?? ()
 #722 0x00000000 in ?? ()
 (gdb) bt 10
 #0  0x556aa067 in strcpy () from /lib32/libc.so.6
 #1  0x08090382 in obj_mangle ()
 #2  0x0808e75a in elf_addmangled ()
 #3  0x5331326e in ?? ()
 #4  0x65746174 in ?? ()
 #5  0x746e656d in ?? ()
 #6  0x56323273 in ?? ()
 #7  0x61697261 in ?? ()
 #8  0x44656c62 in ?? ()
 #9  0x616c6365 in ?? ()
 (More stack frames follow...)
 
 Added to DStress as
 http://dstress.kuehne.cn/run/l/large_id_01_A.d
 http://dstress.kuehne.cn/run/l/large_id_01_B.d
 
 Thomas
 
 
 -----BEGIN PGP SIGNATURE-----
 
 iD8DBQFEAB3S3w+/yD4P9tIRAmIvAJ9csszdBavYR+JeVt3fw2/X7gSYFACgqWdz
 xKt9oe8+L/8dCr6XH3fCt6o=
 =6mcw
 -----END PGP SIGNATURE-----

Not reproducible on Windows XP.
Feb 25 2006
parent Deewiant <deewiant.doesnotlike.spam gmail.com> writes:
Wang Zhen wrote:
 Not reproducible on Windows XP.

Agreed - it gives the error "identifer <mangled form of the identifier> is too long by 2920 characters". What's interesting, though, is that the following code gives the error "identifier <...> is too long by 348 characters" but removing only one character from the identifier makes it compile and run just fine. int AGuidetotheSLangLanguageJohnEDavisdavisspacemiteduMar232003TableofContentsPreface1ABriefHistoryofSLang2Acknowledgements2Introduction3LanguageFeatures4DataTypesandOperators5StatementsandFunctions6ErrorHandling7RunTimeLibrary8InputOutput9ObtainingSLang9OverviewoftheLanguage10VariablesandFunctions11Strings12ReferencingandDereferencing13Arrays14StructuresandUserDefinedTypes15Namespaces15DataTypesandLiteralConstants16PredefinedDataTypes161Integers162FloatingPointNumbers163ComplexNumbers164Strings165NullType166RefType167ArrayTypeandStructType168DataTypeTypeType17TypecastingConvertingfromoneTypetoAnother17Identifiers17Variables17Operators18UnaryOperators19BinaryOperators191ArithmeticOperators192RelationalOperators193BooleanOperators194BitwiseOperators195Namespaceoperator196OperatorPrecedence197BinaryOperatorsandFunctionsReturningMultipleValues20MixingIntegerandFloatingPointArithmetic21ShortCircuitBooleanEvaluation21Statements22VariableDeclarationStatements23AssignmentStatements24Co nditionalandLoopingStatements241ConditionalForms2411if2412ifelse2413if2414orelseandelse2415switch242LoopingForms2421while2422dowhile2423for2424loop2425for2426forever2427foreach25breakreturncontinue25Functions26DeclaringFunaabdsadfasdfann = 3; void main() { AGuidetotheSLangLanguageJohnEDavisdavisspacemiteduMar232003TableofContentsPreface1ABriefHistoryofSLang2Acknowledgements2Introduction3LanguageFeatures4DataTypesandOperators5StatementsandFunctions6ErrorHandling7RunTimeLibrary8InputOutput9ObtainingSLang9OverviewoftheLanguage10VariablesandFunctions11Strings12ReferencingandDereferencing13Arrays14StructuresandUserDefinedTypes15Namespaces15DataTypesandLiteralConstants16PredefinedDataTypes161Integers162FloatingPointNumbers163ComplexNumbers164Strings165NullType166RefType167ArrayTypeandStructType168DataTypeTypeType17TypecastingConvertingfromoneTypetoAnother17Identifiers17Variables17Operators18UnaryOperators19BinaryOperators191ArithmeticOperators192RelationalOperators193BooleanOperators194BitwiseOperators195Namespaceoperator196OperatorPrecedence197BinaryOperatorsandFunctionsReturningMultipleValues20MixingIntegerandFloatingPointArithmetic21ShortCircuitBooleanEvaluation21Statements22VariableDeclarationStatements23AssignmentStatements24C onditionalandLoopingStatements241ConditionalForms2411if2412ifelse2413if2414orelseandelse2415switch242LoopingForms2421while2422dowhile2423for2424loop2425for2426forever2427foreach25breakreturncontinue25Functions26DeclaringFunaabdsadfasdfann += 1; assert (AGuidetotheSLangLanguageJohnEDavisdavisspacemiteduMar232003TableofContentsPreface1ABriefHistoryofSLang2Acknowledgements2Introduction3LanguageFeatures4DataTypesandOperators5StatementsandFunctions6ErrorHandling7RunTimeLibrary8InputOutput9ObtainingSLang9OverviewoftheLanguage10VariablesandFunctions11Strings12ReferencingandDereferencing13Arrays14StructuresandUserDefinedTypes15Namespaces15DataTypesandLiteralConstants16PredefinedDataTypes161Integers162FloatingPointNumbers163ComplexNumbers164Strings165NullType166RefType167ArrayTypeandStructType168DataTypeTypeType17TypecastingConvertingfromoneTypetoAnother17Identifiers17Variables17Operators18UnaryOperators19BinaryOperators191ArithmeticOperators192RelationalOperators193BooleanOperators194BitwiseOperators195Namespaceoperator196OperatorPrecedence197BinaryOperatorsandFunctionsReturningMultipleValues20MixingIntegerandFloatingPointArithmetic21ShortCircuitBooleanEvaluation21Statements22VariableDeclarationStatements23AssignmentStatements24C onditionalandLoopingStatements241ConditionalForms2411if2412ifelse2413if2414orelseandelse2415switch242LoopingForms2421while2422dowhile2423for2424loop2425for2426forever2427foreach25breakreturncontinue25Functions26DeclaringFunaabdsadfasdfann == 4); }
Feb 25 2006