Stephan Szabo <[EMAIL PROTECTED]> writes:
>> 1. There are only about half a dozen places for a user-triggered
>> division by zero to occur (the div and mod functions for int2, int4,
>> int8; have I missed anything?). It would not be very painful to insert
> It's unlikely to come up in practice,
On Mon, 10 Mar 2003, Tom Lane wrote:
> "Merlin Moncure" <[EMAIL PROTECTED]> writes:
> > The only other solution is a #ifdef win32 around places that potentially
> > use integers in the divisor and do some nasty hacking.
>
> Well, it seems to me that we have two different issues to worry about:
>
>
Merlin Moncure wrote:
Doug Royer wrote:
No, try/catch does not trap division by zero unless the underlying
implementation throws an error there is nothing to catch.
I am absolutely 100% sure that you can catch int/0 with a try catch
handler (in c++) on windows platforms (when compiled with ms/bo
Doug Royer wrote:
> No, try/catch does not trap division by zero unless the underlying
> implementation throws an error there is nothing to catch.
>
I am absolutely 100% sure that you can catch int/0 with a try catch
handler (in c++) on windows platforms (when compiled with ms/borland
compiler).
Merlin Moncure wrote:
__try and __except, as far as I can tell are the only way to gracefully
handle certain events. There is also a __finally. This is very much a
Microsoft hack to C and not C++.
GetExceptionCode() is from the win32 api.
In C++, you get to use the much more standard try/cat
"Merlin Moncure" <[EMAIL PROTECTED]> writes:
> The only other solution is a #ifdef win32 around places that potentially
> use integers in the divisor and do some nasty hacking.
Well, it seems to me that we have two different issues to worry about:
1. There are only about half a dozen places for
Tom Lane wrote:
> This is not C.
I can't argue that; but it will compile on a C compiler on the Microsoft
platform. I'm not sure if you were answering tongue-in-cheek, so for
the benefit of the group:
__try and __except, as far as I can tell are the only way to gracefully
handle certain events.
"Merlin Moncure" <[EMAIL PROTECTED]> writes:
> After fighting with the docs a little bit, here is how to handle an
> int/0 in a C application.
> __try
> {
> puts("in try");
> a = 0/b;
> }
> __except( HandleException(GetExceptionCode()) )
>
> The big question is how to fix this on Win32. Is a test in the
integer
> division routines enough? Is there a signal to catch on Win32?
After fighting with the docs a little bit, here is how to handle an
int/0 in a C application.
#include "stdio.h"
#include "excpt.h"
#include "windows.h"
i
Bruce Momjian wrote:
FWIW, this also is a problem with some of the windows ports. For
example, 'select 0/0' is unpredictable and can cause the server to gpf
and restart. This does not include the SRA port, because I don't have
it.
I just tested the SRA Win32 threaded port and both SELECT 1/0 and
Hi guys,
Was just looking around Google for similar reports of errors and came
across this:
MacOS X Server Developer Release Notes: Core OS Runtime
http://www.geminisolutions.com/WebObjects_4.5/Documentation/Developer/YellowBox/ReleaseNotes/Runtime.html
Looks like this is a known problem (as of
On Saturday, March 8, 2003, at 11:54 PM, Justin Clift wrote:
Tom Lane wrote:
2. Consider this Apple's problem and file a bug report.
Is there a good place to report errors to Apple for this kind of thing?
The best place I can find is:
http://developer.apple.com/bugreporter/index.html
Unfortun
Tom Lane wrote:
>
> I checked into this, and indeed OS X 10.2 is behaving funny: integer
> divide by zero doesn't raise any signal, it just returns a bogus
answer.
> They're within their rights to do so according to the ANSI C spec
> (wherein division by zero is stated to have undefined behavior).
"Eric B. Ridge" <[EMAIL PROTECTED]> writes:
> select 1/0; fails as expected on my x86 Linux box, so yer right, it's
> just my little Mac. "I switched because Mac's can divide by zero."
I checked into this, and indeed OS X 10.2 is behaving funny: integer
divide by zero doesn't raise any signal,
14 matches
Mail list logo