Bug in sd386 - OS2

This is a discussion on Bug in sd386 - OS2 ; Finally, I found why sd386 crushes more and more often lately[*]. I think the fix must be --- SHOWCF.C-pre Wed Aug 28 08:52:22 1996 +++ SHOWCF.C Sat Dec 11 01:53:34 2004 @@ -67,7 +67,7 @@ fmtscr(AFILE *fp) void /* */ ...

+ Reply to Thread
Results 1 to 7 of 7

Thread: Bug in sd386

  1. Bug in sd386

    Finally, I found why sd386 crushes more and more often lately[*]. I
    think the fix must be

    --- SHOWCF.C-pre Wed Aug 28 08:52:22 1996
    +++ SHOWCF.C Sat Dec 11 01:53:34 2004
    @@ -67,7 +67,7 @@ fmtscr(AFILE *fp)
    void /* */
    fmtfname(AFILE *fp) /* */
    { /* */
    - char buffer[129]; /* source filespec buffer */
    + char buffer[260*2+20]; /* source filespec buffer */
    char *bp; /* -> to fname row buffer */
    MFILE *dfp; /* -> to debuf file info */
    int i;

    Unfortunately, I do not have icc to recompile it, and in my estimates
    porting to gcc can take several hours (even if I locate all the needed
    headers for NETBIOS). So can some kind soul with icc rebuild it?
    Apparently, the makefile is sd386.mk.

    Thanks,
    Ilya
    [*] Due to different reasons (e.g., file version increasing), names of
    my build directories become longer and longer.

    P.S. I managed to debug it without a debugging build (but the stack
    corruption was detected quite soon; the pointer was going to
    unallocated memory - instead of getting to something allocated but
    invalid; moreover, the string constructed on stack was so distinctive
    that I had an inside to find 4 bytes " <" in some C file ;-).

    P.P.S. Unfortunately, this is not a complete fix: the filename-length
    field is 1-byte-wide, so if filenames are betwen 256 and 260
    characters, sd386 will crush in some other place...

  2. Re: Bug in sd386

    On Sat, 11 Dec 2004 10:01:26 UTC, Ilya Zakharevich
    wrote:

    > Unfortunately, I do not have icc to recompile it, and in my estimates
    > porting to gcc can take several hours (even if I locate all the needed
    > headers for NETBIOS). So can some kind soul with icc rebuild it?
    > Apparently, the makefile is sd386.mk.


    The command file to build it is d.cmd, whch invokes that.

    It also needs some MASM variant called masm386. ALP doesn't hack it. Any
    ideas, anyone?


  3. Re: Bug in sd386

    On 11 Dec 2004 13:46:33 GMT, Bob Eager wrote:

    :>On Sat, 11 Dec 2004 10:01:26 UTC, Ilya Zakharevich
    :> wrote:
    :>
    :>> Unfortunately, I do not have icc to recompile it, and in my estimates
    :>> porting to gcc can take several hours (even if I locate all the needed
    :>> headers for NETBIOS). So can some kind soul with icc rebuild it?
    :>> Apparently, the makefile is sd386.mk.
    :>
    :>The command file to build it is d.cmd, whch invokes that.
    :>
    :>It also needs some MASM variant called masm386. ALP doesn't hack it. Any
    :>ideas, anyone?

    You could try porting it to OpenWatcom C and Wasm.

    Mat Nieuwenhoven




  4. Re: Bug in sd386

    On Sat, 11 Dec 2004 16:51:11 UTC, "Mat Nieuwenhoven"
    wrote:

    > :>The command file to build it is d.cmd, whch invokes that.
    > :>
    > :>It also needs some MASM variant called masm386. ALP doesn't hack it. Any
    > :>ideas, anyone?
    >
    > You could try porting it to OpenWatcom C and Wasm.


    I'm not in the market for a port...! I don't mind recompiling it if I
    have the tools.


  5. Re: Bug in sd386

    [A complimentary Cc of this posting was NOT [per weedlist] sent to
    Bob Eager
    ], who wrote in article <176uZD2KcidF-pn2-iP5icEFghEIX@rikki.tavi.co.uk>:
    > > Unfortunately, I do not have icc to recompile it, and in my estimates
    > > porting to gcc can take several hours (even if I locate all the needed
    > > headers for NETBIOS). So can some kind soul with icc rebuild it?
    > > Apparently, the makefile is sd386.mk.

    >
    > The command file to build it is d.cmd, whch invokes that.
    >
    > It also needs some MASM variant called masm386. ALP doesn't hack it. Any
    > ideas, anyone?


    When I tried to port it, I just used masm from the toolkit; it is
    already 386-enabled ;-).

    TOOLKIT_DIR = I:\TOOLKIT-ddk\DDK
    MASMDIR = $(TOOLKIT_DIR)\base32\tools\os2.386\bin
    ASM = $(MASMDIR)\masm /DFARCALLS /ML /ZI /ZD $*;

    Thanks,
    Ilya

  6. Re: Bug in sd386

    On 11 Dec 2004 17:00:52 GMT, Bob Eager wrote:

    :>On Sat, 11 Dec 2004 16:51:11 UTC, "Mat Nieuwenhoven"
    :> wrote:
    :>
    :>> :>The command file to build it is d.cmd, whch invokes that.
    :>> :>
    :>> :>It also needs some MASM variant called masm386. ALP doesn't hack it. Any
    :>> :>ideas, anyone?
    :>>
    :>> You could try porting it to OpenWatcom C and Wasm.
    :>
    :>I'm not in the market for a port...! I don't mind recompiling it if I
    :>have the tools.

    I took a quick (1 hour) look with Watcom, but it's lots of sweat to port.
    Like utoa which is in the clib now and different, bcopy (easy to fix),
    defines that are now part of Watcom, lots of warnings etc. I wouldn't be
    surprised if it would take months to port, especially because of all the
    assembly files. I wonder if it wouldn't be possible and quicker to add
    functionality to Watcom's debugger instead. I've never used SD386 so I cannot
    judge on what's missing from Watcom.

    Mat Nieuwenhoven



  7. Re: Bug in sd386

    On 11 Dec 2004 13:46:33 GMT, Bob Eager wrote:

    >On Sat, 11 Dec 2004 10:01:26 UTC, Ilya Zakharevich
    > wrote:
    >
    >> Unfortunately, I do not have icc to recompile it, and in my estimates
    >> porting to gcc can take several hours (even if I locate all the needed
    >> headers for NETBIOS). So can some kind soul with icc rebuild it?
    >> Apparently, the makefile is sd386.mk.

    >
    >The command file to build it is d.cmd, whch invokes that.
    >
    >It also needs some MASM variant called masm386. ALP doesn't hack it. Any
    >ideas, anyone?
    >



    I tried building it using MASM2ALP.EXE instead of MASM386. However, I
    got many errors, and so far have not had a successful build.


    Aidan Grey




+ Reply to Thread