--- Comment #20 from pinskia at gmail dot com 2008-10-03 17:34 ---
Subject: Re: Segmentation fault
Sent from my iPhone
On Oct 3, 2008, at 1:38 AM, "ivranos at freemail dot gr"
<[EMAIL PROTECTED]
> wrote:
>
>
> --- Comment #9 from ivranos at freemail dot gr 2008-10-03 08:38
--- Comment #19 from paolo dot carlini at oracle dot com 2008-10-03 13:21
---
Before anything else, you should realize that, per 23.1/3, the type of objects
stored in a std::vector must meet the requirements of CopyConstructible types
(20.1.3), which, in turn, include semantic requireme
--- Comment #18 from ivranos at freemail dot gr 2008-10-03 11:59 ---
The last two code snippers had errors.
--
ivranos at freemail dot gr changed:
What|Removed |Added
--- Comment #17 from ivranos at freemail dot gr 2008-10-03 11:55 ---
The bug occurs in this simpler code too:
#include
#include
#include
#include
#include
int main()
{
using namespace std;
vector intVector(1000*1000);
srand(time(0));
for(size_t i= 0; i< numer
--- Comment #16 from ivranos at freemail dot gr 2008-10-03 11:52 ---
I managed to replicate the bug in simple code:
#include
#include
#include
#include
int main()
{
using namespace std;
vector intVector(1000*1000);
srand(time(0));
for(size_t i= 0; i< RAND_MAX;
--- Comment #15 from ivranos at freemail dot gr 2008-10-03 09:54 ---
So, if there isn't any source code bug at my side, and it is a compiler bug,
you mean "the maintainers" don't care to fix it?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37721
--- Comment #14 from paolo dot carlini at oracle dot com 2008-10-03 09:20
---
You can re-open it, unfortunately we cannot avoid it, at the moment, but given
that you are doing it against the judgement of the maintainers, nobody will pay
any further attention to it, ever. Be warned.
--
--- Comment #13 from ivranos at freemail dot gr 2008-10-03 09:09 ---
The prurpose of the code is to benchmark the sorting of a vector and of a list
with complex objects as their elements (SomeClass).
SomeClass itself doesn't make any other sense, its purpose is to be complex.
I think t
--- Comment #12 from paolo dot carlini at oracle dot com 2008-10-03 08:52
---
Good. In general, please don't try to force the GCC maintainers to debug user
code, this is not going to work. And, by the way, Andrew is right, your class
SomeClass appears badly broken in many different ways
--- Comment #11 from ivranos at freemail dot gr 2008-10-03 08:48 ---
I posted the code to c.l.c++ with the subject "Segmentation fault". If noone
finds any bug, I will reopen the bug here.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37721
--- Comment #10 from paolo dot carlini at oracle dot com 2008-10-03 08:41
---
To be clear: in general PRs are not meant to be re-opened by submitter at will,
unless he provides at the same time additional, detailed evidence going beyond
the initial report. Debug-mode cannot be wrong. Pl
--- Comment #8 from pinskia at gcc dot gnu dot org 2008-10-03 00:09 ---
Nope, your copy constructor causes the crash. It is not really doing a copy of
the struct but causing a random placement to happen so operator< will return
different result when we do a copy between values and such.
--- Comment #7 from ivranos at freemail dot gr 2008-10-02 23:37 ---
To be more precise: I believe the bug is in the library.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37721
--- Comment #6 from ivranos at freemail dot gr 2008-10-02 23:34 ---
The bug can easily be in the library.
--
ivranos at freemail dot gr changed:
What|Removed |Added
--- Comment #5 from paolo dot carlini at oracle dot com 2008-10-02 22:18
---
Why should I do this work for you? This is not an help line, the only purpose
of Bugzilla is tracking and fixing bugs, I'm maintaining the library and given
the diagnostic provided by debug-mode (which exists f
--- Comment #4 from ivranos at freemail dot gr 2008-10-02 21:09 ---
May you be more specific and tell what exactly is invalid? That is what is the
error in the source code.
--
ivranos at freemail dot gr changed:
What|Removed |Added
--- Comment #3 from paolo dot carlini at oracle dot com 2008-10-02 20:42
---
Building with -D_GLIBCXX_DEBUG reveals immediately at run-time that the code is
invalid.
--
paolo dot carlini at oracle dot com changed:
What|Removed |Added
-
--- Comment #2 from ivranos at freemail dot gr 2008-10-02 19:27 ---
Created an attachment (id=16455)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16455&action=view)
The produced main.ii file
The produced main.ii file by
g++ -ansi -pedantic-errors -Wall -save-temps main.cc -o foo
18 matches
Mail list logo