[comp.sys.ibm.pc.programmer] MSC 6.0 Bug/struct params

mms00786@uxa.cso.uiuc.edu (07/18/90)

I just got off the hook with Microsoft Tech Support, and thought I would report
this bug in Microsoft C 6.0 to the net.

When passing a struct to a function, the struct must be word aligned. If your
struct is more than 10 bytes long, and if it has an odd-byte size, the struct
will not get passed correctly to the function.

Workaround is to either pad your struct to it has even length, or pass in a
pointer to the struct.

Hope this helps someone.

Milan.
.

axaris@acsu.buffalo.edu (vassilios e axaris) (07/19/90)

On a similar note, today I learned from Microsoft Tech Support that Codeview
when using himem.sys v2.5 and 2.6 has incompatibilities with the AMI bios,
as far as interrupts are concerned. If you get the all too familiar and hard
to trace error message CV:1319 out of the clear blue, you can bet your extended
memory driver it is your bios. Workaround: none. Fix: in 3 to 4 weeks. In the
meantime: coffee and doughnuts :-)
The problems appear in strange places: after the end of the session with code-
view the keys are permanently shifted (type "." get a ">"). Fix: hold shift
key and hit enter a couple of times. Also, F keys in codeview are assigned new
functions (F3 would not expand the C statement into its assembly equivalent,
but open a memory window). Fix: click with the mouse instead.
The problem was most prevalent and destructive on a 386SX and to a lesser extent
on a 386 (on that only the F keys assumed different roles but the program ran).
We are talking code corruption not small bytes :-) (programmer's equivalent of
small potatoes :-)).

Vassilios E. Axaris

mms00786@uxa.cso.uiuc.edu (07/19/90)

Not to harp on Codeview, but I too experience a 'sticking' control key when I
quit Codeview session, assuming my session did not lead to a 3 finger salute.
Solution : hit the control key. Another, more serious bug :

The code :
                      case 1 :
                           bBoolean = true;
                           ...
                           ...
                           break;

                      case 2 :
                           bBoolean = true;
                            /* different code here */
                           break;

So, I set a breakpoint at the first bBoolean = true statement under case 1.
Breakpoint is correctly met. I hit f8 (step) or f10 (step, not trace), and
the code executed is the code immediately after bBoolean = true under
case 2!! For a moment, I thought there was some silly flaw in the MSC 6.0
code generation. I produced a listing file, and found that this was not
the case. Solution : do not set bp at bBoolean = true;.

I do have a AMI bios, so maybe that's it. 

Milan
.