[LLVMbugs] [Bug 20599] New: Segfault while evaluating a lambda.
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Aug 8 16:38:29 PDT 2014
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: unassignedclangbugs at nondot.org
Reporter: davidsiaw at gmail.com
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140808/9f1596e6/attachment.html>
More information about the llvm-bugs
mailing list