Author Topic: Compiler Weirdness  (Read 2155 times)

Zen

  • Member
  • ****
  • Posts: 962
  • slightly red-shifted
Compiler Weirdness
« on: July 03, 2016, 04:52:59 AM »
I've this extremely annoying experience with, I think, my MASM compiler, repeatedly,...and, I'm wondering if any of you have had a similar experience. Both last summer, and this summer, (when working on my defunct COM CoreFluxWarp and MABDELOUAHAB's MASM32Ref Test Project) I've had little things go wrong with compiled programs. For instance, an invoked Win32 API procedure that I know should work, inexplicably returns an error,...or, I get an access violation (for no apparent reason),...or, a pointer that leads nowhere,...or, something minor, but, annoying, like that.
Last summer, I had this kind of thing happen over a hundred times,...so, clearly it's a real artifact. I'm assuming that it is the MASM compiler (ml.exe) that is at fault. I use HUTCH's Quick Editor and ml.exe from the latest MASM SDK. I'm almost certain that it's not the Quick Editor (because HUTCH is Australian, and Australians are NOT capable of writing funky voodoo code). Anyway, when I'm coding, I write code, compile, and test,...over and over. If the compiler produces code that has a minor problem executing, I usually just add some more code, or alter the structure of the code branching somewhat (changing offsets and addresses), and the problem mysteriously disappears. Yes,...I make lots of dumb errors when coding,...but, this type of malfunction occurs regularly. It's usually the last block of code that I have edited. It's truly maddening (I'm actually kind of surprised that the compiler is not printing out death threats with the text information that is displayed when compiling). And, I can't imagine why it is happening. My best guess is that the MASM compiler keeps a representation of the last compiled program either in memory, or, an intermediate type of file that is scanned when the compiler is invoked. But, I really don't know.
There must be a rational explanation. It could be the Windows Multitasking mechanism, that gives threads from other programs running in the background a slice of processor time, somehow interfering with the structure of the compiling process. (But, I'm really just guessing,... :dazzled:)

...Of course,...I have plausible alternative theories for this phenomenon:   
  • El Diablo/Dark Matter
  • An Evil-Axis type of supervillain syndicate comprised of rogue NSA executives, extraterrestrials, elite Russian criminal hackers, Sports Illustrated Swimsuit Models, zombies nudists, Terminators from the Future,...and, undoubtedly, degenerate Mastermind Italian Overlords,...using code injection techniques to destabilize Western Civilization.
  • My Smart Phone (probably hacked by DAVE, to get revenge for the phalanx of drones that I unleashed on Phoenix)
  • A random flux of Hyper-Relativistic Intergalactic neutrinos, or, maybe, even,...the CERN Large Hadron Collider.
  • I'm actually dangerously insane.
...That last one is my favorite, because it allows me to experiment with medications,...:bgrin:
Zen

jj2007

  • Member
  • *****
  • Posts: 8735
  • Assembler is fun ;-)
    • MasmBasic
Re: Compiler Weirdness
« Reply #1 on: July 03, 2016, 06:00:46 AM »
I've seen lots of weird things in programming, but what you describe is not among them...

Occasionally ML version 6.15 chokes in macros, there are indeed some minor bugs, but it usually results in build errors, not in wrong code.

If you have such a problem, rename the exe and build it again with HJWasm or AsmC, then launch Olly and compare the versions.

Are the affected sources very big? The RichEdit control has some quirks that might play foul here.

Zen

  • Member
  • ****
  • Posts: 962
  • slightly red-shifted
Re: Compiler Weirdness
« Reply #2 on: July 03, 2016, 06:18:23 AM »
JOCHEN,
Thanks for the reply. The sources are large, yes. But, there is another possibility that I haven't mentioned. I'm working on a computer in a public library (somewhere in California), and, I have no idea how their network security software is configured (or, any of their other software, for that matter). I know for a fact that they have VMWare installed somewhere on the network. Could this be a file-caching problem ??? Maybe, an automated program that scans and copies files,...:icon_eek:
...It's probably something like that.
Zen

qWord

  • Member
  • *****
  • Posts: 1473
  • The base type of a type is the type itself
    • SmplMath macros
Re: Compiler Weirdness
« Reply #3 on: July 03, 2016, 07:10:14 AM »
The name "compiler" is primarily used for programs that translate source code from a high-level programming language to a lower level language (e.g., assembly language or machine code).
..............................
MREAL macros - when you need floating point arithmetic while assembling!

jj2007

  • Member
  • *****
  • Posts: 8735
  • Assembler is fun ;-)
    • MasmBasic
Re: Compiler Weirdness
« Reply #4 on: July 03, 2016, 08:24:08 AM »
The sources are large, yes.

If you can reproduce the error, try to compare two executables produced by a) ML and b) JWasm, HJWasm or AsmC. One way to do this is to select all in Olly (select the top line, hold Shift, press Ctrl End), then Ctrl A to analyse, then Ctrl C to copy.

anunitu

  • Member
  • *****
  • Posts: 1037
Re: Compiler Weirdness
« Reply #5 on: July 03, 2016, 10:34:57 AM »
Oh Zen,how interesting that you have finely come to understand the futility of your efforts to control the being known as ASSEMBLER.

Yes your code is in fact alive,and controlled by none other then "DR. EVIL",and the only way you can regain control of your "amateur efforts" at machine control is to pay.....Yes to pay..
 

Note,never search amateur and Juvenile, together just to use Google as a spell checker.(try it and find out why..)

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 5762
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: Compiler Weirdness
« Reply #6 on: July 03, 2016, 04:44:45 PM »
 :biggrin:
Quote
The name "compiler" is primarily used for programs that translate source code from a high-level programming language to a lower level language (e.g., assembly language or machine code)
:P
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :biggrin:

Zen

  • Member
  • ****
  • Posts: 962
  • slightly red-shifted
Re: Compiler Weirdness
« Reply #7 on: July 06, 2016, 04:42:11 AM »
ANUNITU,
OK,...buddy. :bgrin: So, this is some kind of Ransomware scam ??? Do you think I'm a complete fool ???
...Anyway,...I'm all out of cash,...from paying off all the previous ransomware purveyors,...

...And,...QWORD,...yes, thanks for clarifying the issue,...:dazzled:
:dazzled: (my suspicion is that it's one of your dang, indecipherable macros that has infested my reality,...causing untold misery and suffering). :dazzled:

...So,...we're all in agreement, then,...it's mental,...and, totally...hopeless,...
Regardless,...I'm litigating !!!
Zen