Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
Qt Creator 4.12.4, Qt Creator 4.15.0-rc1
-
None
-
-
f31d583081e612e1db50a3c4165aa41c645549f9
Description
I was trying to use QT Creator with Linux kernel.
This is original bug report filed against Fedora 32/33:
https://bugzilla.redhat.com/show_bug.cgi?id=1886548
libCPlusPlus segfaults while trying to parse drivers/net/ethernet/ibm/ibmvnic.c device driver.
Steps to reproduce
(requires usual stuff to build Linux: make, gcc, nothing earth shattering):
$ wget 'https://mirrors.edge.kernel.org/pub/linux/kernel/v5.x/linux-5.11.tar.xz'
$ xz -d <linux-5.11.tar.xz | tar xf -
$ cd linux-5.11
$ echo '-std=c17' >xxx.cflags
$ echo '#define __KERNEL__' >xxx.config
$ echo '[General]' >xxx.creator
$ echo '-std=c++17' >xxx.cxxflags
$ echo 'drivers/net/ethernet/ibm/ibmvnic.c' >xxx.files
$ touch xxx.includes
$ echo 'include' >>xxx.includes
$ echo 'arch/x86/include' >>xxx.includes
$ make allmodconfig
$ make prepare
Open Project -> xxx.creator
Thread (pooled)[34850]: segfault at 0 ip 00007f2b6fd4c031 sp 00007f2b387a1750 error 4 in libCPlusPlus.so.4.13.2[7f2b6fcec000+cc000]
Code: 41 c7 45 18 00 00 00 00 49 89 45 00 8b 45 1c 8d 50 01 89 55 1c 41 89 45 08 48 c7 04 24 00 00 00 00 e8 c3 54 fa ff 48 8b 3c 24 <48> 8b 07 ff 90 e8 00 00 00 49 8d 55 18 be 22 00 00 00 48 89 ef 49
0000000000189020 <CPlusPlus::Parser::parsePrimaryExpression(CPlusPlus::ExpressionAST*&)@@Base>:
...
1893a9: e8 d2 33 fa ff call 12c780 <CPlusPlus::Parser::parseCompoundStatement(CPlusPlus::StatementAST*&)@plt>
1893ae: 48 8b 3c 24 mov rdi,QWORD PTR [rsp]
**1893b2: ===> 48 8b 07 mov rax,QWORD PTR [rdi] <===
1893b5: ff 90 e8 00 00 00 call QWORD PTR [rax+0xe8]
1893bb: 49 8d 55 18 lea rdx,[r13+0x18]
1893bf: be 22 00 00 00 mov esi,0x22
1893c4: 48 89 ef mov rdi,rbp
1893c7: 49 89 45 10 mov QWORD PTR [r13+0x10],rax
1893cb: e8 f0 7f fa ff call 1313c0 <CPlusPlus::Parser::match(int, int*)@plt>
1893d0: 4d 89 2c 24 mov QWORD PTR [r12],r13
1893d4: e9 35 fd ff ff jmp 18910e <CPlusPlus::Parser::parsePrimaryExpression(CPlusPlus::ExpressionAST*&)@@Base+0xee>
Attachments
For Gerrit Dashboard: QTCREATORBUG-25606 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
343968,2 | CPlusPlus: Increase maximum statement depth | 4.15 | qt-creator/qt-creator | Status: MERGED | +2 | 0 |