Bug 2104764 - clang-14 crashes with clazy plugin
Summary: clang-14 crashes with clazy plugin
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: clazy
Version: 36
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Jan Grulich
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-07-07 06:11 UTC by Cajus Pollmeier
Modified: 2023-01-29 02:29 UTC (History)
1 user (show)

Fixed In Version: clazy-1.11-1.fc37 clazy-1.11-1.fc36
Clone Of:
Environment:
Last Closed: 2023-01-29 01:31:50 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Reproducing mini example (1.61 KB, application/gzip)
2022-07-07 06:11 UTC, Cajus Pollmeier
no flags Details

Description Cajus Pollmeier 2022-07-07 06:11:49 UTC
Created attachment 1895082 [details]
Reproducing mini example

Description of problem:

When compiling with clazy enabled, it crashes on each compile job. Looks like it didn't get any re-build for f36.

Version-Release number of selected component (if applicable):

clang-resource-filesystem-14.0.0-1.fc36.x86_64
clang-libs-14.0.0-1.fc36.x86_64
clang-14.0.0-1.fc36.x86_64
clazy-1.9-2.fc35.x86_64
llvm-libs-14.0.0-1.fc36.x86_64
llvm-14.0.0-1.fc36.x86_64
llvm-test-14.0.0-1.fc36.x86_64
llvm-static-14.0.0-1.fc36.x86_64
llvm-devel-14.0.0-1.fc36.x86_64

How reproducible:

Run the attached example via build.sh after adjusting the CMAKE_PREFIX_PATH to match your Qt installation. I had a upstream version around and no fedora provided.

Steps to Reproduce:
1. Adjust build.sh to match your installation
2. Run it

Actual results:

#0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
#1  0x00007fe1b115ccb3 in __pthread_kill_internal (signo=6, threadid=<optimized out>) at pthread_kill.c:78
#2  0x00007fe1b110c9c6 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#3  0x00007fe1b10f6886 in __GI_abort () at abort.c:100
#4  0x00007fe1b1150d9e in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x7fe1b1288925 "%s\n") at ../sysdeps/posix/libc_fatal.c:155
#5  0x00007fe1b116695c in malloc_printerr (str=str@entry=0x7fe1b128af40 "munmap_chunk(): invalid pointer") at malloc.c:5664
#6  0x00007fe1b1166c3c in munmap_chunk (p=<optimized out>) at malloc.c:3060
#7  0x00007fe1b116b18a in __GI___libc_free (mem=<optimized out>) at malloc.c:3381
#8  0x00007fe1b85359c8 in llvm::MallocAllocator::Deallocate (Alignment=8, Size=<optimized out>, Ptr=<optimized out>, 
    this=0x7fe1baf87478 <clang::format::FormatTokenLexer::CSharpAttributeTargets+24>) at /usr/include/llvm/Support/AllocatorBase.h:93
#9  llvm::StringMapEntry<llvm::NoneType>::Destroy<llvm::MallocAllocator> (allocator=..., this=<optimized out>) at /usr/include/llvm/ADT/StringMapEntry.h:143
#10 llvm::StringMap<llvm::NoneType, llvm::MallocAllocator>::~StringMap (this=0x7fe1baf87460 <clang::format::FormatTokenLexer::CSharpAttributeTargets>, __in_chrg=<optimized out>)
    at /usr/include/llvm/ADT/StringMap.h:186
#11 llvm::StringSet<llvm::MallocAllocator>::~StringSet (this=0x7fe1baf87460 <clang::format::FormatTokenLexer::CSharpAttributeTargets>, __in_chrg=<optimized out>)
    at /usr/include/llvm/ADT/StringSet.h:23
#12 0x00007fe1b110f577 in __cxa_finalize (d=0x7fe1bad0ff60) at cxa_finalize.c:83
#13 0x00007fe1b849ca87 in __do_global_dtors_aux () from /lib64/libclang-cpp.so.14
#14 0x00007ffed59dbd90 in ?? ()
#15 0x00007fe1bafb7d3e in _dl_fini () at dl-fini.c:142
Backtrace stopped: frame did not save the PC


Expected results:

Just works.


Additional info:

When manually compiling clazy (I tried v1.11) and putting the ClazyPlugin.so in place, it works.

Comment 1 Fedora Update System 2023-01-19 06:10:23 UTC
FEDORA-2023-4bffef7de9 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2023-4bffef7de9

Comment 2 Fedora Update System 2023-01-19 06:10:25 UTC
FEDORA-2023-a1ec4ff2e1 has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2023-a1ec4ff2e1

Comment 3 Fedora Update System 2023-01-21 03:31:02 UTC
FEDORA-2023-4bffef7de9 has been pushed to the Fedora 37 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-4bffef7de9`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-4bffef7de9

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 4 Fedora Update System 2023-01-21 16:28:23 UTC
FEDORA-2023-a1ec4ff2e1 has been pushed to the Fedora 36 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-a1ec4ff2e1`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-a1ec4ff2e1

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 5 Fedora Update System 2023-01-29 01:31:50 UTC
FEDORA-2023-4bffef7de9 has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 6 Fedora Update System 2023-01-29 02:29:54 UTC
FEDORA-2023-a1ec4ff2e1 has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.