• Welcome to Valhalla Legends Archive.
 

Did I just win?

Started by iago, February 19, 2003, 10:46 AM

Previous topic - Next topic

iago

I broke msdev! :-)

QuoteC:\Documents and Settings\iago\My Documents\bak\My private projects\testprog\testprog.cpp(16) : fatal error C1001: INTERNAL COMPILER ERROR
  (compiler file 'E:\8168\vc98\p2\src\P2\x86\MDmisc.c', line 1244)
    Please choose the Technical Support command on the Visual C++
    Help menu, or open the Technical Support help file for more information
Error executing cl.exe.

Here's the code (I know it's stupid, the memset is wrong etc.):
#include "stdafx.h"
#include <stdio.h>
#include <stdlib.h>
#include <memory.h>

#define TRUE  1
#define FALSE 0
#define NULL  0

int main(int argc, char* argv[])
{
      char TestArray[0x7FFFFFFF];
      memset(TestArray, 1, 1);

      system("pause");
      return 0;
}
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


iago

#1
hmm.. by doing this:
#include "stdafx.h"
#include <stdio.h>
#include <stdlib.h>
#include <memory.h>

#define TRUE  1
#define FALSE 0
#define NULL  0

char TestArray[0x7FFFFFFF];

int main(int argc, char* argv[])
{
      
      memset(TestArray, 1, 1);

      system("pause");
      return 0;
}

It compiles, but I get the error "Could not execute: Bad executable format(Win32 error 193)" when it tries to run :-D
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


Zakath

#2
Why the heck did you create such an enormous array? Just because you could? ;D
Quote from: iago on February 02, 2005, 03:07 PM
Yes, you can't have everybody...contributing to the main source repository.  That would be stupid and create chaos.

Opensource projects...would be dumb.

iago

#3
I wanted to time how long it would take to access that many elements of an array, realistically (if I used a loop and, say, 10 elements, caching would screw it up).
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


Yoni

#4
That's way over the maximum.
If you want to test access speed of a large block of memory, allocate like 100MB on the heap, not 2GB on the stack!
By making it global you probably confused the compiler enough for it to create an invalid file.

iago

#5
Yes, but at the time I didn't stop and think, "Hey, this is WAAAY too big!"  :-)
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


Skywing

QuoteThat's way over the maximum.
If you want to test access speed of a large block of memory, allocate like 100MB on the heap, not 2GB on the stack!
By making it global you probably confused the compiler enough for it to create an invalid file.
I don't think you can typically find 2GB of contiguous unused address space :p

Besides, without large address aware set, you can only allocate 2GB maximum (total).