rmariani@watmum.waterloo.edu (Rico Mariani) (05/03/88)
Well another working day has passed and here are two bugs to watch out for: 1. The m32 library defines the function abs() as a floating point absolute value. This disagrees with the UNIX definition... The UNIX C libraries define abs as an integer in integer out function. 2. This one is complicated. Consider a big program compiled with the small code model (this is OK according to the manuals). Say it's way bigger than 64k, like about 200k or so. Now suppose that there are 2 modules that contain code like this: map.c ----- int map() { ... } int mmap(f) int (*f)(); { ... if ( f == map) printf("Yes\n"); else printf("No\n"); ... } eval.c (code is far away (>64k) from the other module) ------ int map(); eval() { ... mmap(map); ... } You would expect that when eval calls mmap that the output would be "Yes" right? Well you'd be wrong. In the small memory model, a reference to 'map' which is not within range (like the one in eval) turns into a reference to the function jump table. This table has lots of entries like. (_map): jmp _map The table is kept in the data segment so that all functions can see it. This is normally great, if I try to call map it instead calls the jump table in the data segment and --poof-- we're in the map function just fine. However in the above case the map symbol refers to the jump table in file eval.c and it refers to the actual code in the file map.c so when the comparison happens it fails! ------- By the way I wouldn't have found this bug in a million years if I hadn't run out and bought SDB. SDB is the greatest... Good work Jim! -Rico P.S. I offered to be a Beta tester, I even wrote a letter to Manx... :-)
kim@amdahl.uts.amdahl.com (Kim DeVaughn) (05/05/88)
In article <4242@watcgl.waterloo.edu>, rmariani@watmum.waterloo.edu (Rico Mariani) writes: > > Subject: Re: Some gotchas in Aztec 3.4 ^^^ > > By the way I wouldn't have found this bug in a million years if I hadn't > run out and bought SDB. SDB is the greatest... Good work Jim! ^^^ Hmmmmmm ... I take it then that these bugs (and other recent reports ?) are *really* for v3.6 ... is that correct, Rico? /kim P.S. And I agree with you about SDB!!! -- UUCP: kim@amdahl.amdahl.com or: {sun,decwrl,hplabs,pyramid,ihnp4,uunet,oliveb,cbosgd,ames}!amdahl!kim DDD: 408-746-8462 USPS: Amdahl Corp. M/S 249, 1250 E. Arques Av, Sunnyvale, CA 94086 CIS: 76535,25
rmariani@watmum.waterloo.edu (Rico Mariani) (05/06/88)
In article kim@amdahl.uts.amdahl.com (Kim DeVaughn) writes: >In article rmariani@watmum.waterloo.edu (Rico Mariani) writes: >> >> Subject: Re: Some gotchas in Aztec 3.4 > ^^^ >> By the way I wouldn't have found this bug in a million years if I hadn't >> run out and bought SDB. SDB is the greatest... Good work Jim! > ^^^ >Hmmmmmm ... I take it then that these bugs (and other recent reports ?) are >*really* for v3.6 ... is that correct, Rico? I was hoping nobody would notice that... OK the scoop is this, I found all of those bugs on v3.4. While I was trying to figure out the last one, I visited Comspec and bought SDB switching to 3.6 in the process. The bottom line is that all the bugs I reported except for the first one (the register allocation bug) are still in v3.6. -Rico Whatever you do, buy SDB. It's worth every bleeping penny.