* Re: c++ char exceptions
@ 2002-04-23 1:48 Michael D. Crawford
2002-04-23 5:31 ` Lassi A. Tuura
0 siblings, 1 reply; 12+ messages in thread
From: Michael D. Crawford @ 2002-04-23 1:48 UTC (permalink / raw)
To: cygwin
> You threw const char*
That shouldn't matter. At the worst it should mean that the exception is not
caught by any of the catch clauses given, so the "return 0" would be taken.
The only thing that should happen to an exception object after you're done with
it is that objects thrown by value are destroyed. In this case the pointer
would be destroyed, but the memory it points to should not be deleted or anything.
Usually throwing a pointer is not what you really want to do, but it shouldn't
cause a crash.
Michael D. Crawford
GoingWare Inc. - Expert Software Development and Consulting
http://www.goingware.com/
crawford@goingware.com
Tilting at Windmills for a Better Tomorrow.
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: c++ char exceptions
2002-04-23 1:48 c++ char exceptions Michael D. Crawford
@ 2002-04-23 5:31 ` Lassi A. Tuura
2002-04-23 8:51 ` hmmm possible gpl problem? Gareth Pearce
2002-04-25 1:00 ` c++ char exceptions Michael D. Crawford
0 siblings, 2 replies; 12+ messages in thread
From: Lassi A. Tuura @ 2002-04-23 5:31 UTC (permalink / raw)
To: Michael D. Crawford; +Cc: cygwin
> That shouldn't matter. At the worst it should mean that the exception is not
> caught by any of the catch clauses given, so the "return 0" would be taken.
It does matter -- in this case the exception was not handled, and
therefore terminate() gets called, which probably called abort(). That
is, the "return 0" is never taken, the exception leaks outside main().
//lat
--
Behold the turtle. He makes progress only when
he sticks his neck out. --James Bryant Conant
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 12+ messages in thread
* hmmm possible gpl problem?
2002-04-23 5:31 ` Lassi A. Tuura
@ 2002-04-23 8:51 ` Gareth Pearce
2002-04-23 10:45 ` Adrian Prantl
2002-04-25 1:00 ` c++ char exceptions Michael D. Crawford
1 sibling, 1 reply; 12+ messages in thread
From: Gareth Pearce @ 2002-04-23 8:51 UTC (permalink / raw)
To: cygwin
okay - i dont claim to know anything much about gpl ...
but - http://www.tux.org/pub/security/secnet/tools/nat10/
(which is the only place I found it in a quick google search)
distributes a gpl program linked against cygwin.dll (note not cygwin1.dll)
without cygwin source.
Going on past emails, this looks faulty, but thought i would post it here
for
someone with more experience in such matters to comment.
Regards,
Gareth Pearce
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: hmmm possible gpl problem?
2002-04-23 8:51 ` hmmm possible gpl problem? Gareth Pearce
@ 2002-04-23 10:45 ` Adrian Prantl
2002-04-23 11:46 ` Charles Wilson
2002-04-23 11:58 ` Christopher Faylor
0 siblings, 2 replies; 12+ messages in thread
From: Adrian Prantl @ 2002-04-23 10:45 UTC (permalink / raw)
To: cygwin
Gareth Pearce wrote:
> okay - i dont claim to know anything much about gpl ...
> but - http://www.tux.org/pub/security/secnet/tools/nat10/
> (which is the only place I found it in a quick google search)
> distributes a gpl program linked against cygwin.dll (note not cygwin1.dll)
> without cygwin source.
>
> Going on past emails, this looks faulty, but thought i would post it here
> for
> someone with more experience in such matters to comment.
>
> Regards,
> Gareth Pearce
I really don't think that it would be appropriate to start a fox hunt
for
everyone that could be violating the gpl in this or the other minor way.
As long as the reason is not a commercial exploit, I believe that too
much
cautions would result in a harm to the free software community. I
believe that
a too strict prosecution of the rules would not encourage people to
release
there works to the public.
btw I think the GPL only states that the sources should be made
available if
someone asks for them, so it would be ok to distribute the program in
binary
form and send the source per email if requested. (please correct me if I
am
wrong)
regards,
adrian
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: hmmm possible gpl problem?
2002-04-23 10:45 ` Adrian Prantl
@ 2002-04-23 11:46 ` Charles Wilson
2002-04-23 11:58 ` Christopher Faylor
1 sibling, 0 replies; 12+ messages in thread
From: Charles Wilson @ 2002-04-23 11:46 UTC (permalink / raw)
To: Adrian Prantl, cygwin
Adrian Prantl wrote:
>>okay - i dont claim to know anything much about gpl ...
>>but - http://www.tux.org/pub/security/secnet/tools/nat10/
>>(which is the only place I found it in a quick google search)
>>distributes a gpl program linked against cygwin.dll (note not cygwin1.dll)
>>without cygwin source.
>>
>>Going on past emails, this looks faulty, but thought i would post it here
>>for
>>someone with more experience in such matters to comment.
Nope, it's okay. If cygwin were licensed under the pure GPL, then you
would be correct. However, the cygwin license, in accordance with
section 10 of the GPL, has an exception: if you don't distribute
cygwin1.dll itself, then you needn't distribute the sources to
cygwin1.dll (even if your binary -- which you DO distribute -- is linked
with libcygwin.a[the import lib for cygwin1.dll]). However, in that
case, you're still required to distribute the sources(*) of YOUR program
if you distribute its cygwin-linked binary -- even though, without
cygwin1.dll, the program is inoperable.
See http://cygwin.com/licensing.html
(*) further requirement: you must release your sources under a license
compatible with the Open Source Definition:
http://www.opensource.org/osd.html and not just any old "look but don't
touch" license.
>
> I really don't think that it would be appropriate to start a fox hunt
> for
> everyone that could be violating the gpl in this or the other minor way.
Granted -- we all have better things to do. I think this message, and
the recent vcdimager/etc thread, were both just something people
stumbled onto in the course of other activities.
In the case of the vcdimager issue recently discussed on this list, I
was downloading it *because I wanted to used it*, and when I installed
it, it didn't work: cygwin DLL conflicts. This clued me that the
program (a) used cygwin [Cool!!] and (b) distributed cygwin1.dll
[conflicted with my "real" cygwin installation; not cool.] I was able
to work around (b). However, because I know that if the GPL is not
enforced, then a bad actor could point to all those instances of
non-enforcement, and use that to invalidate the GPL everywhere. ["bad
actor" == NOT another opensource group, but someone who wanted to take
GPL code, modify it, and then distribute the result without source.
"Embrace and Extend"? Microsoft's Kerberos implementation?]. The claim
would go something like this:
"Hey, why pick on me? Obviously the GPL is not enforceable because
you guys didn't enforce it in these other cases. Trying to enforce it
on me is unequal application; you're in violation of the 14th amendment,
It's an illegal restraint of trade, blah blah blah..."
> As long as the reason is not a commercial exploit, I believe that too
> much
> cautions would result in a harm to the free software community. I
> believe that
> a too strict prosecution of the rules would not encourage people to
> release
> there works to the public.
You're welcome to your beliefs. However, the legal realm has its own
rules, which are not subject to your opinions. (sorry, but that's the
blunt truth). Being nice to "the good guys" could cost us big when we
have to fight "the bad guys".
> btw I think the GPL only states that the sources should be made
> available if
> someone asks for them, so it would be ok to distribute the program in
> binary
> form and send the source per email if requested. (please correct me if I
> am
> wrong)
Technically, the sources must be distributed "in the same manner as the
binary" -- or a **WRITTEN** offer of source must be provided WITH the
binary. "Written" in legal terms means "on a physical piece of paper".
Since we haven't gotten the Trek transporter technology to work yet,
we can't include this "written" offer inside an electronic download
(that is, a README file doesn't cut it). So, if the binary is on an ftp
site, we must provide the sources on that ftp site. http downloaded
binary? then source must be downloadable via http. emailed binary?
emailed source. binary on CD? sources on CD(*).
(*)Special case (as documented in the GPL): the distributor may charge a
nominal additional fee for the sources to cover the physical duplication
and mailing costs, when the source is provided on a physical medium.
Oh goodie. Another GPL war. I just love these. </end sarc> Sigh.
--Chuck
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: hmmm possible gpl problem?
2002-04-23 10:45 ` Adrian Prantl
2002-04-23 11:46 ` Charles Wilson
@ 2002-04-23 11:58 ` Christopher Faylor
1 sibling, 0 replies; 12+ messages in thread
From: Christopher Faylor @ 2002-04-23 11:58 UTC (permalink / raw)
To: cygwin
On Tue, Apr 23, 2002 at 07:34:07PM +0200, Adrian Prantl wrote:
>I really don't think that it would be appropriate to start a fox hunt
>for everyone that could be violating the gpl in this or the other minor
>way. As long as the reason is not a commercial exploit, I believe that
>too much cautions would result in a harm to the free software
>community. I believe that a too strict prosecution of the rules would
>not encourage people to release there works to the public.
I can't say that I agree. If a license isn't enforced, it becomes worthless.
If we can't rely on people who should be our allies to follow the rules,
and illustrate how it should be done, then I don't see how we can enforce
the rules in good faith with anyone else.
I'm not saying that we should start a "fox hunt" but we should certainly
politely inform people of the rules whereever we see them broken.
cgf
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: c++ char exceptions
2002-04-23 5:31 ` Lassi A. Tuura
2002-04-23 8:51 ` hmmm possible gpl problem? Gareth Pearce
@ 2002-04-25 1:00 ` Michael D. Crawford
1 sibling, 0 replies; 12+ messages in thread
From: Michael D. Crawford @ 2002-04-25 1:00 UTC (permalink / raw)
To: Lassi A. Tuura; +Cc: cygwin
You're right, I wasn't thinking, if an exception isn't caught before it
leaves main it aborts the program.
So maybe codewarrior has a bug!
Mike
On Tue, 2002-04-23 at 06:33, Lassi A. Tuura wrote:
> > That shouldn't matter. At the worst it should mean that the exception is not
> > caught by any of the catch clauses given, so the "return 0" would be taken.
>
> It does matter -- in this case the exception was not handled, and
> therefore terminate() gets called, which probably called abort(). That
> is, the "return 0" is never taken, the exception leaks outside main().
>
> //lat
> --
> Behold the turtle. He makes progress only when
> he sticks his neck out. --James Bryant Conant
>
> --
> Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
> Bug reporting: http://cygwin.com/bugs.html
> Documentation: http://cygwin.com/docs.html
> FAQ: http://cygwin.com/faq/
>
--
Michael D. Crawford
GoingWare Inc. - Expert Software Development and Consulting
crawford@goingware.com
http://www.goingware.com/
Tilting at Windmills for a Better Tomorrow.
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 12+ messages in thread
* RE: c++ char exceptions
@ 2002-04-23 1:54 Robert Collins
0 siblings, 0 replies; 12+ messages in thread
From: Robert Collins @ 2002-04-23 1:54 UTC (permalink / raw)
To: Michael D. Crawford, cygwin
> -----Original Message-----
> From: Michael D. Crawford [mailto:crawford@goingware.com]
> Sent: Tuesday, April 23, 2002 6:24 PM
>
> Usually throwing a pointer is not what you really want to do,
> but it shouldn't
> cause a crash.
Is it worth putting this up as a bug on the gcc bugs database?
Rob
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: c++ char exceptions
@ 2002-04-23 1:22 Michael D. Crawford
0 siblings, 0 replies; 12+ messages in thread
From: Michael D. Crawford @ 2002-04-23 1:22 UTC (permalink / raw)
To: cygwin
It aborts with g++ 2.95.4 on Debian PowerPC Linux too.
But if I compile it with CodeWarrior 6 on Windows it runs normally, doesn't
crash, and gives the exit code of 1.
I think CodeWarrior is correct, and that this is a bug in g++, but not in cygwin.
Mike
Thus it was written:
I don't know if this is a cygwin issue or if I am doing something
fundamentally wrong...
int
main (int argc, char **argv)
{
try
{
throw "catch this";
}
catch (char *message)
{
return 1;
}
return 0;
}
coredumps on me. Throwing int's works fine. Throwing (string) "foo"
works fine.
---
Michael D. Crawford
GoingWare Inc. - Expert Software Development and Consulting
http://www.goingware.com/
crawford@goingware.com
Tilting at Windmills for a Better Tomorrow.
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 12+ messages in thread
* RE: c++ char exceptions
@ 2002-04-23 1:21 Robert Collins
0 siblings, 0 replies; 12+ messages in thread
From: Robert Collins @ 2002-04-23 1:21 UTC (permalink / raw)
To: Danny Smith, cygwin
> -----Original Message-----
> From: Danny Smith [mailto:danny_r_smith_2001@yahoo.co.nz]
> Sent: Tuesday, April 23, 2002 6:11 PM
>
> Robert wrote:
> >
> > I don't know if this is a cygwin issue or if I am doing something
> > fundamentally wrong...
> >
>
> You threw const char*
Sigh. Blush. I should have caught (no pun intended) that.
Thanks Danny.
Rob
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 12+ messages in thread
* RE: c++ char exceptions
@ 2002-04-23 1:18 Danny Smith
0 siblings, 0 replies; 12+ messages in thread
From: Danny Smith @ 2002-04-23 1:18 UTC (permalink / raw)
To: cygwin
Robert wrote:
>
> I don't know if this is a cygwin issue or if I am doing something
> fundamentally wrong...
>
You threw const char*
int
main (int argc, char **argv)
{
try
{
throw "catch this";
}
catch (const char *message)
// ^^^^^
{
return 1;
}
return 0;
}
>
http://messenger.yahoo.com.au - Yahoo! Messenger
- A great way to communicate long-distance for FREE!
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 12+ messages in thread
* c++ char exceptions
@ 2002-04-23 1:15 Robert Collins
0 siblings, 0 replies; 12+ messages in thread
From: Robert Collins @ 2002-04-23 1:15 UTC (permalink / raw)
To: Cygwin
I don't know if this is a cygwin issue or if I am doing something
fundamentally wrong...
int
main (int argc, char **argv)
{
try
{
throw "catch this";
}
catch (char *message)
{
return 1;
}
return 0;
}
coredumps on me. Throwing int's works fine. Throwing (string) "foo"
works fine.
Anyway, this is partly for the archives, partly for curiosity.
Rob
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2002-04-25 5:26 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-23 1:48 c++ char exceptions Michael D. Crawford
2002-04-23 5:31 ` Lassi A. Tuura
2002-04-23 8:51 ` hmmm possible gpl problem? Gareth Pearce
2002-04-23 10:45 ` Adrian Prantl
2002-04-23 11:46 ` Charles Wilson
2002-04-23 11:58 ` Christopher Faylor
2002-04-25 1:00 ` c++ char exceptions Michael D. Crawford
-- strict thread matches above, loose matches on Subject: below --
2002-04-23 1:54 Robert Collins
2002-04-23 1:22 Michael D. Crawford
2002-04-23 1:21 Robert Collins
2002-04-23 1:18 Danny Smith
2002-04-23 1:15 Robert Collins
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).