google / google/clspv

LLVM's static singleton object is causing invalid size free issue when clspv is compiled as shared library, C API called.

Open
#1,516 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
LLVM
Stars
729
Forks
110
Avg merge
17h 51m
Merged PRs (30d)
23

Description

Static initialization order fiasco is happening

The issue has been resolved when I changed the source code of llvm, wrapping the object as a function.
What I wonder is whether that issue is from version of llvm or this library itself.

I suspect that editing the source of llvm is not the proper solution, and maybe the caller might be the one which is causing some issues, so I am asking this.

Steps to reproduce:
- Compile clspv as shared library, and link it to C programme (not C++).
- Use C API `clspvCompileFromSourcesString`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.