Re: Seg fault with hla 1.99 on Fedora 8 linux



DaveR wrote:
Hi Frank - looks like our post's crossed!

Yeah, it happens...

I'm pretty sure my setup's ok - but I've gone with the "vanilla" hla
setup to remove any doubt:

Okay... FWIW, I tried it "your way" (more or less - /home/fbk/usr/hla/lahdeedah", not "local") and it worked fine. Next step, try putting hla and hlaparse someplace "normal"... haven't gotten to trying that...

[root@beechwood:/usr/hla ] # ls -l /usr/hla/hla /usr/hla/hlaparse /usr/
hla/hlalib/hlalib.a
-rwxr-xr-x 1 root root 519176 2008-01-07 21:02 /usr/hla/hla
-rw-r--r-- 1 root root 1575420 2008-01-07 21:09 /usr/hla/hlalib/
hlalib.a
-rwxr-xr-x 1 root root 2191935 2008-01-07 21:02 /usr/hla/hlaparse

The file sizes ( and timestamps - ignoring timezones ) match, which
looks good.
Environment variables below:

[david@beechwood:~ ] $ env | grep hla
hlalib=/usr/hla/hlalib/hlalib.a
hlainc=/usr/hla/include
PATH=/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/hla:/home/
david/bin

And the switch assemblers test repeated:

[david@beechwood:~/local/AoA/Volume1/Ch02 ] $ which hla
/usr/hla/hla
[david@beechwood:~/local/AoA/Volume1/Ch02 ] $ hla -xo
HelloWorldWithVar.hla
[david@beechwood:~/local/AoA/Volume1/Ch02 ] $ ./HelloWorldWithVar
Hello, World of Assembly Language
InitDemo's value is Segmentation fault
[david@beechwood:~/local/AoA/Volume1/Ch02 ] $ hla -xg
HelloWorldWithVar.hla
[david@beechwood:~/local/AoA/Volume1/Ch02 ] $ ././HelloWorldWithVar
Hello, World of Assembly Language
InitDemo's value is 5

So I have uploaded the hla file and the output from both compiles to
http://hla.webhop.org/ for anyone who want a closer look.

Now we're cooking with Gas! :) Actually it's the Fasm version I'm interested in. A preliminary analysis of your "Fasm" executable shows that where we should be in CONV_I64TOBUF, we're in a block of zeros... Go boom!

*Why* remains a mystery. My version of 1.99 reads *just* like your original post, right up to "Version Version"... but my build number is 12922 and yours is 12923... weird... (I obtained 1.100 and verified that it *doesn't* report 1.99 and build 12923, so that's not it...).

I linked your .o file "ld -o hwvar HelloWorldWithVar.o /usr/hla/hlalib/hlalib.a"... and it worked perfectly.

Lemme see... Your library's corrupted. No, then it wouldn't work with Gas, either.

Your ld is choking on something my ld likes. Something HLA gets right with "-xg", but gets "wrong" with the internal Fasm (possibly only in "build 12923"?). Improbable as that seems, I can't rule it out, and can't think of anything else.

I'll see if I can get into your .o file, Fasm vs Gas, byte by byte, but I probably won't spot anything...

Do you know the best way to raise this with Randy? Bug on
Sourceforge / email etc?

The bugtracker on SourceFrog would be great... but I think it's mostly for the new library, and versions 1.100+ of HLA. Wouldn't hurt. Randy's SF username is "rhydehla", and you can reach any SourceForge user at "users.sf.net". (or randyhyde at earthlink dot net) I'll cc this to the Yahoo group - where he *is* posting recently. You might want to join that group anyway:

http://tech.groups.yahoo.com/group/aoaprogramming/

Thanks for posting those files - gives us something we can sink our teeth into, even if the "why" isn't obvious - you're not dreamin', it really does segfault, yet the .o file works okay here... Use "-xg" for the examples, I guess...

Best,
Frank

.



Relevant Pages

  • Re: Development for High Level Assembler revisited
    ... Right now the progress on HLA v2.0 is halting because I'm ... group of rewritten modules for the HLA stdlib v2.0 "real soon now". ... Most the current work involves writing unit test code (and, of course, ... > can update the SourceForge site. ...
    (alt.lang.asm)
  • Re: Development for High Level Assembler revisited
    ... The compiler itself is over 100,000 lines of source code, ... Given the fact that HLA v2.0 is a complete rewrite of ... > can update the SourceForge site. ... How many programmers did offer any useful contributions for documentation or source code improvements and updates for the planned new architecture so far? ...
    (alt.lang.asm)
  • Re: Mac OS X / FreeBSD ASM Resources
    ... at Sourceforge and the HLA stuff. ... I guess I can study the output of HLA ... code and see what is what as well as using online sites. ... libraries on OSX from assembly. ...
    (comp.lang.asm.x86)
  • Re: Help me about this question.
    ... As HLA really requires nothing more from FASM, ... I'll have to set up a Linux box to test this one of these days. ... Is it a "benefit" to be able to view code that won't assemble? ...
    (alt.lang.asm)
  • Re: Help me about this question.
    ... If you don't think that the FASM ... better source code formatting, then that explains why your source code ... complaining about the quality of the HLA standard library code? ... to compile its own Win32 Equates list, clown. ...
    (alt.lang.asm)