Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c++ > #69753 > unrolled thread

Re: Where are the exception-objects allocated?

Started bySam <sam@email-scan.com>
First post2019-11-15 06:36 -0500
Last post2019-11-15 11:14 -0500
Articles 20 on this page of 33 — 7 participants

Back to article view | Back to comp.lang.c++

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Where are the exception-objects allocated? Sam <sam@email-scan.com> - 2019-11-15 06:36 -0500
    Re: Where are the exception-objects allocated? Bonita Montero <Bonita.Montero@gmail.com> - 2019-11-15 13:37 +0100
      Re: Where are the exception-objects allocated? Bonita Montero <Bonita.Montero@gmail.com> - 2019-11-15 17:17 +0100
        Re: Where are the exception-objects allocated? Sam <sam@email-scan.com> - 2019-11-15 11:51 -0500
          Re: Where are the exception-objects allocated? Bonita Montero <Bonita.Montero@gmail.com> - 2019-11-15 18:56 +0100
            Re: Where are the exception-objects allocated? Sam <sam@email-scan.com> - 2019-11-15 17:18 -0500
              Re: Where are the exception-objects allocated? Bonita Montero <Bonita.Montero@gmail.com> - 2019-11-16 09:05 +0100
                Re: Where are the exception-objects allocated? Sam <sam@email-scan.com> - 2019-11-16 14:32 -0500
                  Re: Where are the exception-objects allocated? Bonita Montero <Bonita.Montero@gmail.com> - 2019-11-16 20:49 +0100
                    Re: Where are the exception-objects allocated? Sam <sam@email-scan.com> - 2019-11-16 20:08 -0500
                      Re: Where are the exception-objects allocated? Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk> - 2019-11-17 01:10 +0000
                        Re: Where are the exception-objects allocated? Ian Collins <ian-news@hotmail.com> - 2019-11-17 14:31 +1300
                      Re: Where are the exception-objects allocated? Bonita Montero <Bonita.Montero@gmail.com> - 2019-11-17 09:18 +0100
                        Re: Where are the exception-objects allocated? Sam <sam@email-scan.com> - 2019-11-17 07:59 -0500
                          Re: Where are the exception-objects allocated? Bonita Montero <Bonita.Montero@gmail.com> - 2019-11-17 16:06 +0100
                            Re: Where are the exception-objects allocated? Sam <sam@email-scan.com> - 2019-11-17 16:27 -0500
                              Re: Where are the exception-objects allocated? Ian Collins <ian-news@hotmail.com> - 2019-11-18 16:29 +1300
                              Re: Where are the exception-objects allocated? Bonita Montero <Bonita.Montero@gmail.com> - 2019-11-18 07:01 +0100
                                Re: Where are the exception-objects allocated? Sam <sam@email-scan.com> - 2019-11-18 10:16 -0500
                                  Re: Where are the exception-objects allocated? Bonita Montero <Bonita.Montero@gmail.com> - 2019-11-18 16:48 +0100
                                    Re: Where are the exception-objects allocated? Sam <sam@email-scan.com> - 2019-11-18 11:33 -0500
                                      Re: Where are the exception-objects allocated? Bonita Montero <Bonita.Montero@gmail.com> - 2019-11-18 17:41 +0100
                                        Re: Where are the exception-objects allocated? Sam <sam@email-scan.com> - 2019-11-18 11:58 -0500
                                          Re: Where are the exception-objects allocated? Bonita Montero <Bonita.Montero@gmail.com> - 2019-11-18 18:15 +0100
                                            Re: Where are the exception-objects allocated? Sam <sam@email-scan.com> - 2019-11-18 12:22 -0500
                                              Re: Where are the exception-objects allocated? Keith Thompson <kst-u@mib.org> - 2019-11-18 10:05 -0800
                                                Re: Where are the exception-objects allocated? Sam <sam@email-scan.com> - 2019-11-18 18:21 -0500
                                                  Re: Where are the exception-objects allocated? David Brown <david.brown@hesbynett.no> - 2019-11-19 08:26 +0100
                                                    Re: Where are the exception-objects allocated? Sam <sam@email-scan.com> - 2019-11-19 06:38 -0500
                                                  Re: Where are the exception-objects allocated? Keith Thompson <kst-u@mib.org> - 2019-11-19 10:29 -0800
                                                  Re: Where are the exception-objects allocated? James Kuyper <jameskuyper@alumni.caltech.edu> - 2019-11-22 11:08 -0500
                                                    Re: Where are the exception-objects allocated? Sam <sam@email-scan.com> - 2019-11-22 20:49 -0500
      Re: Where are the exception-objects allocated? Sam <sam@email-scan.com> - 2019-11-15 11:14 -0500

Page 1 of 2  [1] 2  Next page →


#69753 — Re: Where are the exception-objects allocated?

FromSam <sam@email-scan.com>
Date2019-11-15 06:36 -0500
SubjectRe: Where are the exception-objects allocated?
Message-ID<cone.1573817763.398348.20214.1004@monster.email-scan.com>

[Multipart message — attachments visible in raw view] — view raw

Bonita Montero writes:

>>> Can anyone tell me what would be a proper way to allocate storage
>>> for an exception-object being thrown without causing that this
>>> allocation might fail? And remember that these objects even have
>>> to live longer than a thread because you might refer to it by
>>> an std::exception_ptr.
>
>> Exception objects are not created by user code; they are temporary
>> objects created by the implementation, copy-initialized by the
>> expression passed to the throw expression. It is unspecified how the
>> implementation allocates the storage that they are stored in. ...
>
> I know that this is unspecified.
> But I'm interested how this is actually implemented.

Feel free to download the source code to gcc and libstdc++, and see for  
yourself.

If you are so desperate to find out, that would be the only way how;  
excepting the very unlikely possibility that whoever wrote that is around  
here.

Otherwise: nobody else knows, or cares.

[toc] | [next] | [standalone]


#69756

FromBonita Montero <Bonita.Montero@gmail.com>
Date2019-11-15 13:37 +0100
Message-ID<qqm65t$q88$3@news.albasani.net>
In reply to#69753
> Feel free to download the source code to gcc and libstdc++, and see for 
> yourself.

Read the complete thread before you post!
I already found this (https://libcxxabi.llvm.org/spec.html):

| void* __cxa_allocate_exception(size_t thrown_size) throw();
| Effects: Allocates memory to hold the exception to be thrown.
| thrown_size is the size of the exception object. Can allocate
| additional memory to hold private data. If memory can not be
| allocated, call std::terminate().
| Returns: A pointer to the memory allocated for the exception object.

This looks to me the usual and pragmatical way it is done.

[toc] | [prev] | [next] | [standalone]


#69761

FromBonita Montero <Bonita.Montero@gmail.com>
Date2019-11-15 17:17 +0100
Message-ID<qqmj3f$t22$2@news.albasani.net>
In reply to#69756
>>> Feel free to download the source code to gcc and libstdc++, and see 
>>> for yourself.

>> Read the complete thread before you post!

> Unfortunately, I did.

If you did the above answer would be senseless.

>> I already found this (https://libcxxabi.llvm.org/spec.html):
>>
>> | void* __cxa_allocate_exception(size_t thrown_size) throw();
>> | Effects: Allocates memory to hold the exception to be thrown.
>> | thrown_size is the size of the exception object. Can allocate
>> | additional memory to hold private data. If memory can not be
>> | allocated, call std::terminate().
>> | Returns: A pointer to the memory allocated for the exception object.
>> This looks to me the usual and pragmatical way it is done.

> Excellent. Now, aren't you curious how this "__cxa_allocate_exception" 
> does about its business? And after you figure that out, I'm sure you'll 
> be curious enough to know the precise semantics down to the transistor 
> level.

It's a normal heap-allocation.

[toc] | [prev] | [next] | [standalone]


#69765

FromSam <sam@email-scan.com>
Date2019-11-15 11:51 -0500
Message-ID<cone.1573836685.621300.20214.1004@monster.email-scan.com>
In reply to#69761

[Multipart message — attachments visible in raw view] — view raw

Bonita Montero writes:

>>>> Feel free to download the source code to gcc and libstdc++, and see for  
>>>> yourself.
>
>>> Read the complete thread before you post!
>
>> Unfortunately, I did.
>
> If you did the above answer would be senseless.

It's not my fault you lack the minimal capacity to understand its brilliance.

>>> I already found this (https://libcxxabi.llvm.org/spec.html):
>>>
>>> | void* __cxa_allocate_exception(size_t thrown_size) throw();
>>> | Effects: Allocates memory to hold the exception to be thrown.
>>> | thrown_size is the size of the exception object. Can allocate
>>> | additional memory to hold private data. If memory can not be
>>> | allocated, call std::terminate().
>>> | Returns: A pointer to the memory allocated for the exception object.
>>> This looks to me the usual and pragmatical way it is done.
>
>> Excellent. Now, aren't you curious how this "__cxa_allocate_exception" does  
>> about its business? And after you figure that out, I'm sure you'll be  
>> curious enough to know the precise semantics down to the transistor level.
>
> It's a normal heap-allocation.

Yes, but how does that work? I guess you don't know the answer to that, and  
that frustrates you. Too bad.

[toc] | [prev] | [next] | [standalone]


#69768

FromBonita Montero <Bonita.Montero@gmail.com>
Date2019-11-15 18:56 +0100
Message-ID<qqmot4$g7d$1@news.albasani.net>
In reply to#69765
>>>>> Feel free to download the source code to gcc and libstdc++, and see 
>>>>> for yourself.

>>>> Read the complete thread before you post!

>>> Unfortunately, I did.

>> If you did the above answer would be senseless.

> It's not my fault you lack the minimal capacity to understand its 
> brilliance.

Another time: if you had read that I quoted a part of the LLVM-website
your posting would be gratuitous.

>>> Excellent. Now, aren't you curious how this 
>>> "__cxa_allocate_exception" does about its business? And after you 
>>> figure that out, I'm sure you'll be curious enough to know the 
>>> precise semantics down to the transistor level.

>> It's a normal heap-allocation.

> Yes, but how does that work? I guess you don't know the answer to that, 
> and that frustrates you. Too bad.

Doesn't matter. I asked just to know if the throwing might fail because
the exception-object couldn't be created. There are several heap-alloca-
tion-strategies which are all equally appropriate for this purpose.
Heap-allocation is a different topic.

[toc] | [prev] | [next] | [standalone]


#69777

FromSam <sam@email-scan.com>
Date2019-11-15 17:18 -0500
Message-ID<cone.1573856283.318532.20214.1004@monster.email-scan.com>
In reply to#69768

[Multipart message — attachments visible in raw view] — view raw

Bonita Montero writes:

>>>> Excellent. Now, aren't you curious how this "__cxa_allocate_exception" does  
>>>> about its business? And after you figure that out, I'm sure you'll be  
>>>> curious enough to know the precise semantics down to the transistor level.
>
>>> It's a normal heap-allocation.
>
>> Yes, but how does that work? I guess you don't know the answer to that, and  
>> that frustrates you. Too bad.
>
> Doesn't matter. I asked just to know if the throwing might fail because
> the exception-object couldn't be created. There are several heap-alloca-
> tion-strategies which are all equally appropriate for this purpose.
> Heap-allocation is a different topic.

Look, it's ok that you don't know this, and you have no idea how it works.  
Nobody's perfect. Don't let it upset you.


[toc] | [prev] | [next] | [standalone]


#69785

FromBonita Montero <Bonita.Montero@gmail.com>
Date2019-11-16 09:05 +0100
Message-ID<qqoakh$8ug$2@news.albasani.net>
In reply to#69777
>> Doesn't matter. I asked just to know if the throwing might fail because
>> the exception-object couldn't be created. There are several heap-alloca-
>> tion-strategies which are all equally appropriate for this purpose.
>> Heap-allocation is a different topic.

> Look, it's ok that you don't know this, and you have no idea how it 
> works. Nobody's perfect. Don't let it upset you.

I know different heap-allcoation-strategies.
But how this works isn't related to my initial question.

[toc] | [prev] | [next] | [standalone]


#69822

FromSam <sam@email-scan.com>
Date2019-11-16 14:32 -0500
Message-ID<cone.1573932751.838483.5930.1004@monster.email-scan.com>
In reply to#69785

[Multipart message — attachments visible in raw view] — view raw

Bonita Montero writes:

>> Look, it's ok that you don't know this, and you have no idea how it works.  
>> Nobody's perfect. Don't let it upset you.
>
> I know different heap-allcoation-strategies.

Sure, everyone believes you.

[toc] | [prev] | [next] | [standalone]


#69824

FromBonita Montero <Bonita.Montero@gmail.com>
Date2019-11-16 20:49 +0100
Message-ID<qqpjsq$4v2$1@news.albasani.net>
In reply to#69822
>>> Look, it's ok that you don't know this, and you have no idea how it 
>>> works. Nobody's perfect. Don't let it upset you.

>> I know different heap-allcoation-strategies.

> Sure, everyone believes you.

Slogans like from the scoolyard ...

[toc] | [prev] | [next] | [standalone]


#69846

FromSam <sam@email-scan.com>
Date2019-11-16 20:08 -0500
Message-ID<cone.1573952897.38039.13392.1004@monster.email-scan.com>
In reply to#69824

[Multipart message — attachments visible in raw view] — view raw

Bonita Montero writes:

>>>> Look, it's ok that you don't know this, and you have no idea how it works.  
>>>> Nobody's perfect. Don't let it upset you.
>
>>> I know different heap-allcoation-strategies.
>
>> Sure, everyone believes you.
>
> Slogans like from the scoolyard ...

Right. I clearly remember how everyone in the schoolyard always pretended to  
be experts on heap allocation strategies.

[toc] | [prev] | [next] | [standalone]


#69847

FromMr Flibble <flibbleREMOVETHISBIT@i42.co.uk>
Date2019-11-17 01:10 +0000
Message-ID<J51AF.11680$_H6.8473@fx24.fr7>
In reply to#69846
On 17/11/2019 01:08, Sam wrote:
> Bonita Montero writes:
> 
>>>>> Look, it's ok that you don't know this, and you have no idea how it 
>>>>> works. Nobody's perfect. Don't let it upset you.
>>
>>>> I know different heap-allcoation-strategies.
>>
>>> Sure, everyone believes you.
>>
>> Slogans like from the scoolyard ...
> 
> Right. I clearly remember how everyone in the schoolyard always pretended 
> to be experts on heap allocation strategies.

Hmmm, I wonder if emoji works on Usenet. Lets find out:

🤣

/Flibble

-- 
"Snakes didn't evolve, instead talking snakes with legs changed into 
snakes." - Rick C. Hodgin

“You won’t burn in hell. But be nice anyway.” – Ricky Gervais

“I see Atheists are fighting and killing each other again, over who 
doesn’t believe in any God the most. Oh, no..wait.. that never happens.” – 
Ricky Gervais

"Suppose it's all true, and you walk up to the pearly gates, and are 
confronted by God," Byrne asked on his show The Meaning of Life. "What 
will Stephen Fry say to him, her, or it?"
"I'd say, bone cancer in children? What's that about?" Fry replied.
"How dare you? How dare you create a world to which there is such misery 
that is not our fault. It's not right, it's utterly, utterly evil."
"Why should I respect a capricious, mean-minded, stupid God who creates a 
world that is so full of injustice and pain. That's what I would say."

[toc] | [prev] | [next] | [standalone]


#69848

FromIan Collins <ian-news@hotmail.com>
Date2019-11-17 14:31 +1300
Message-ID<h3bm8dF4cl5U21@mid.individual.net>
In reply to#69847
On 17/11/2019 14:10, Mr Flibble wrote:
> On 17/11/2019 01:08, Sam wrote:
>> Bonita Montero writes:
>>
>>>>>> Look, it's ok that you don't know this, and you have no idea how it
>>>>>> works. Nobody's perfect. Don't let it upset you.
>>>
>>>>> I know different heap-allcoation-strategies.
>>>
>>>> Sure, everyone believes you.
>>>
>>> Slogans like from the scoolyard ...
>>
>> Right. I clearly remember how everyone in the schoolyard always pretended
>> to be experts on heap allocation strategies.
> 
> Hmmm, I wonder if emoji works on Usenet. Lets find out:
> 
> 🤣

💩

-- 
Ian.

[toc] | [prev] | [next] | [standalone]


#69853

FromBonita Montero <Bonita.Montero@gmail.com>
Date2019-11-17 09:18 +0100
Message-ID<qqqvo5$8md$1@news.albasani.net>
In reply to#69846
>>>>> Look, it's ok that you don't know this, and you have no idea how it 
>>>>> works. Nobody's perfect. Don't let it upset you.

>>>> I know different heap-allcoation-strategies.

>>> Sure, everyone believes you.

>> Slogans like from the scoolyard ...

> Right. I clearly remember how everyone in the schoolyard always 
> pretended to be experts on heap allocation strategies.

I was talking about you, and you know that.

[toc] | [prev] | [next] | [standalone]


#69861

FromSam <sam@email-scan.com>
Date2019-11-17 07:59 -0500
Message-ID<cone.1573995566.925890.25607.1004@monster.email-scan.com>
In reply to#69853

[Multipart message — attachments visible in raw view] — view raw

Bonita Montero writes:

>>>>>> Look, it's ok that you don't know this, and you have no idea how it works.  
>>>>>> Nobody's perfect. Don't let it upset you.
>
>>>>> I know different heap-allcoation-strategies.
>
>>>> Sure, everyone believes you.
>
>>> Slogans like from the scoolyard ...
>
>> Right. I clearly remember how everyone in the schoolyard always pretended to  
>> be experts on heap allocation strategies.
>
> I was talking about you, and you know that.

Highly-trained professionals have a word for this. It's called "projection".


[toc] | [prev] | [next] | [standalone]


#69866

FromBonita Montero <Bonita.Montero@gmail.com>
Date2019-11-17 16:06 +0100
Message-ID<qqrnlj$d02$1@news.albasani.net>
In reply to#69861
>>> Right. I clearly remember how everyone in the schoolyard always 
>>> pretended to be experts on heap allocation strategies.

>> I was talking about you, and you know that.

> Highly-trained professionals have a word for this. It's called 
> "projection".

You're not so professional to determine when someone projects
something. You're simply an idiot.

[toc] | [prev] | [next] | [standalone]


#69869

FromSam <sam@email-scan.com>
Date2019-11-17 16:27 -0500
Message-ID<cone.1574026060.850952.32587.1004@monster.email-scan.com>
In reply to#69866

[Multipart message — attachments visible in raw view] — view raw

Bonita Montero writes:

>>>> Right. I clearly remember how everyone in the schoolyard always pretended to  
>>>> be experts on heap allocation strategies.
>
>>> I was talking about you, and you know that.
>
>> Highly-trained professionals have a word for this. It's called "projection".
>
> You're not so professional to determine when someone projects
> something. You're simply an idiot.

And what exactly would be your professional qualifications for diagnosing  
someone to be an idiot? If you're going to stake a position that  
professional qualifications are required for a psychological evaluation –  
such as whether someone's projecting, or not – shirley you then have to  
prove your professional qualifications for diagnosing a case of idiocy.

I'm very convinced that if you demand others to uphold to the highest  
standards of professional qualifications, in order to accuse someone of  
projection, you most certainly will meet your own standards and be able to  
demonstrate your own professional qualifications for determining if  
someone's an idiot.

So, let's see them (asking for a friend).

[toc] | [prev] | [next] | [standalone]


#69871

FromIan Collins <ian-news@hotmail.com>
Date2019-11-18 16:29 +1300
Message-ID<h3ehgdF4cl5U22@mid.individual.net>
In reply to#69869
On 18/11/2019 10:27, Sam wrote:
> Bonita Montero writes:
> 

>>
>> You're not so professional to determine when someone projects
>> something. You're simply an idiot.
> 
> And what exactly would be your professional qualifications for diagnosing
> someone to be an idiot?

A master's in trolling?

-- 
Ian.

[toc] | [prev] | [next] | [standalone]


#69876

FromBonita Montero <Bonita.Montero@gmail.com>
Date2019-11-18 07:01 +0100
Message-ID<qqtc4f$m4k$2@news.albasani.net>
In reply to#69869
> And what exactly would be your professional qualifications for 
> diagnosing someone to be an idiot? If you're going to stake a position 
> that professional qualifications are required for a psychological 
> evaluation – such as whether someone's projecting, or not – shirley you 
> then have to prove your professional qualifications for diagnosing a 
> case of idiocy.
> I'm very convinced that if you demand others to uphold to the highest 
> standards of professional qualifications, in order to accuse someone of 
> projection, you most certainly will meet your own standards and be able 
> to demonstrate your own professional qualifications for determining if 
> someone's an idiot.
> So, let's see them (asking for a friend).

Ok, idiot wasn't correct; complete idiot would be more appropriate.

[toc] | [prev] | [next] | [standalone]


#69887

FromSam <sam@email-scan.com>
Date2019-11-18 10:16 -0500
Message-ID<cone.1574090182.778338.45825.1004@monster.email-scan.com>
In reply to#69876

[Multipart message — attachments visible in raw view] — view raw

Bonita Montero writes:

>> And what exactly would be your professional qualifications for diagnosing  
>> someone to be an idiot? If you're going to stake a position that  
>> professional qualifications are required for a psychological evaluation –  
>> such as whether someone's projecting, or not – shirley you then have to  
>> prove your professional qualifications for diagnosing a case of idiocy.
>> I'm very convinced that if you demand others to uphold to the highest  
>> standards of professional qualifications, in order to accuse someone of  
>> projection, you most certainly will meet your own standards and be able to  
>> demonstrate your own professional qualifications for determining if  
>> someone's an idiot.
>> So, let's see them (asking for a friend).
>
> Ok, idiot wasn't correct; complete idiot would be more appropriate.

Oh, so you only have professional qualifications for evaluating if someone's  
a complete idiot? That's good enough. Let's see them, please. Or, in the  
alternate, what is your membership number in the American Society of  
Standards in Working Idiocy Professional Evaluators; and I'll just look your  
membership on their web site.

[toc] | [prev] | [next] | [standalone]


#69888

FromBonita Montero <Bonita.Montero@gmail.com>
Date2019-11-18 16:48 +0100
Message-ID<qqueh0$rge$1@news.albasani.net>
In reply to#69887
> Oh, so you only have professional qualifications for evaluating if 
> someone's a complete idiot? That's good enough. Let's see them, please. 
> Or, in the alternate, what is your membership number in the American 
> Society of Standards in Working Idiocy Professional Evaluators; and
> I'll  just look your membership on their web site.

Everyone with an average knowledge of human nature has this, except you.

[toc] | [prev] | [next] | [standalone]


Page 1 of 2  [1] 2  Next page →

Back to top | Article view | comp.lang.c++


csiph-web