Bug 1320290 - g++ crash on build_user_type_conversion
Summary: g++ crash on build_user_type_conversion
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: 25
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-22 18:38 UTC by Ritesh Khadgaray
Modified: 2017-12-07 12:14 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-12-07 12:14:20 UTC
Type: Bug


Attachments (Terms of Use)
Preprocessed source (4.72 MB, text/x-csrc)
2016-03-22 18:38 UTC, Ritesh Khadgaray
no flags Details

Description Ritesh Khadgaray 2016-03-22 18:38:31 UTC
Created attachment 1139193 [details]
Preprocessed source

Description of problem:
g++ crashes on build


Version-Release number of selected component (if applicable):
gcc-c++-6.0.0-0.17.fc25.x86_64

== How reproducible: ==
always

== Steps to Reproduce: ==
1. install cpprestsdk - http://github.com/Microsoft/cpprestsdk
2. build the application below


== Actual results: ==
$ g++ bug-json.cc  -lcpprest  -lboost_system -lssl -lcrypto && ./a.out 
bug-json.cc: In function ‘int main()’:
bug-json.cc:14:22: internal compiler error: Segmentation fault
  if(obj["status"] == "true")
                      ^~~~~~
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
Preprocessed source stored into /tmp/ccDhA06Y.out file, please attach this to your bugreport.


== Expected results: ==
don't crash


== Additional info: ==

Packages can also be downloaded from - https://copr.fedorainfracloud.org/coprs/ritz/cpprestsdk/

$ cat bug-json.cc 
#include <iostream>
#include <cpprest/http_client.h>
#include <cpprest/json.h>


using namespace web;

int main(void)
{
	json::value obj;
	obj["status"] = json::value::string("true");
	std::cout << "json value: " << obj["status"];
	if(obj["status"] == "true")
		std::cout << "We live ! \n";
	return 0;
}

Comment 1 Marek Polacek 2016-03-22 19:55:41 UTC
Reproduced, started with

commit eaaf539eded32eab0d2b503357113478e4464d60
Author: jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Sat Oct 24 02:58:10 2015 +0000

        DR 1518
        DR 1630
        PR c++/54835
        PR c++/60417
        * call.c (convert_like_real): Value-initialization can't use
        explicit constructors in C++11 and up.
    
    git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229283 138bc75d-0d04-0410-961f-82ee72b054a4

Before this rev we gave:
bug-json.cc: In function ‘int main()’:
bug-json.cc:14:22: error: converting to ‘web::json::value’ from initializer list would use explicit constructor ‘web::json::value::value(const char_t*)’
In file included from /usr/local/include/cpprest/http_msg.h:34:0,
                 from /usr/local/include/cpprest/http_client.h:47,
                 from bug-json.cc:2:
/usr/local/include/cpprest/json.h:540:33: note:   initializing argument 1 of ‘bool web::json::value::operator==(const web::json::value&) const’

Comment 2 Marek Polacek 2016-03-22 19:56:29 UTC
There's Boost involved so it's going to be very hard to reduce.  :/

Comment 3 Jan Kurik 2016-07-26 04:22:06 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 25 development cycle.
Changing version to '25'.

Comment 4 Fedora End Of Life 2017-11-16 18:43:23 UTC
This message is a reminder that Fedora 25 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 25. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '25'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 25 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 5 Marek Polacek 2017-12-07 12:14:20 UTC
This seems to have been fixed.


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