| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | exception handling problem |
Hello all,
======================
#include
#include
double zero=0.0;
main(int argc, char *argv[], char *envp[])
{
_fpreset();
printf("MASK1=%X\n",_control87(0,MCW_EM)); // 0x362
printf("1111\n");
printf("%f\n",1.0/zero);
printf("2222\n");
_fpreset();
printf("MASK1=%X\n",_control87(0,MCW_EM)); // 0x362
printf("1111\n");
printf("%f\n",1.0/zero);
printf("2222\n");
}
=======================
this program exectutes a 1.0/0.0 with enabled FLT-DIV-By_ZERO exception. so
it should fail on the first division.
i've tested this program on 20 machines and it is ok on 18 of them (ok
means == it fails on the first division). except on 2 machines it says:
MASK1=362
1111
INFINITY < !!!!
2222
MASK1=362
1111
exception c0...95 ...
I've EXCHANGED (!) the motherboard+cpu+memory between a failing and a OK
machine after the first test serie and the behaviour does NOT chance. still
the machines which fails the test fails it with the other mother board and
vv.
i can't see any common / special SW components installed on the 2 failing machines.
(eq: one of failing is WARP GA one is WARP GA+FP17. and the ok machines are
also some GA, some GA+FP17).
any ideas?
WARPED!, Mario
--- Msgedsq/2 2.2e
* Origin: LC/32 Development Team-Vienna-Austria (2:310/14.11)SEEN-BY: 50/99 270/101 620/243 625/100 711/401 409 410 413 430 808 809 934 SEEN-BY: 711/955 712/407 515 624 628 713/888 800/1 @PATH: 310/14 1 24/999 888 396/1 270/101 712/515 711/808 934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.