http://llvm.org/bugs/show_bug.cgi?id=20599
Bug ID: 20599
Summary: Segfault while evaluating a lambda.
Product: clang
Version: 3.4
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++11
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
Full source code including build scripts can be found here:
https://github.com/davidsiaw/serialist
Full logs and reproductions can be found here:
https://travis-ci.org/davidsiaw/serialist/jobs/32029298
https://travis-ci.org/davidsiaw/serialist/jobs/32029968
This bug is always reproducible. All the code is available publicly, uses
autoconf and automake to build and a description of the environment can be
found in http://docs.travis-ci.com/user/ci-environment/
You can also fork the source code and test it on a ubuntu-like environment.
DESCRIPTION:
The following is an excerpt of the code compiled. clang seems to be segfaulting
on the for_each line at `fmt`. The lambda contains another lambda, and clang is
segfaulting on the inside where fmt.ForeachMember is called. This however works
on g++ 4.8
void Generate(std::wstring name, std::vector<FormatDesc> format,
std::wostream& output)
{
TScheme sch(name);
sch.GenerateHeader(output);
for_each(format.begin(), format.end(), [&](FormatDesc fmt)
{
sch.GenerateStructOpening(fmt.GetName(), output);
fmt.ForeachMember([&](FormatMember& member)
{
Unlike the other bugs, this is a really simple usage of a vector. No static
members, no initializers, no friend class, no user-defined operator().
Could be related to 20046, but there is no call to variable template here
inside the lambda the entire class this function is inside is a template class.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs