Commit Graph

2664 Commits

Author SHA1 Message Date
Joel Dice
d89a96ae6d use absolute path for test-executable in makefile
This is necessary to avoid crashes on OS X due to
CFBundleGetMainBundle and friends not behaving well otherwise.
2011-09-30 18:46:54 -06:00
Joel Dice
ad22de6d73 fix uninitialized variable in bootimage.cpp 2011-09-30 18:46:53 -06:00
Joel Dice
ed6945dec7 fix offset calculations in arm.cpp and powerpc.cpp 2011-09-30 18:46:53 -06:00
Joel Dice
5f05110f33 fix type of TargetPointerMask 2011-09-30 17:00:45 -06:00
Joel Dice
df4626c260 fix Windows cross build 2011-09-30 15:21:12 -06:00
Joel Dice
b063f10ad5 fix Windows build 2011-09-30 14:44:25 -06:00
Joel Dice
88d614eb25 remove distinction between thunks and bootThunks in compile.cpp
Now that the AOT-compiled code image is position-independent, there is
no further need for this distinction.  In fact, it was harmful,
because we were still using runtime-generated thunks when we should
have been using the ones in the code image.  This resulted in
EXC_BAD_ACCESS errors on non-jailbroken iOS devices.
2011-09-30 13:17:28 -06:00
Joel Dice
b862f5f90a add bare-bones UUID implementation 2011-09-29 18:27:34 -06:00
Joel Dice
296cb74847 add bare-bones ConcurrentLinkedQueue implementation 2011-09-29 18:26:50 -06:00
Joel Dice
a8bb0d074b implement first() and last() in TreeSet 2011-09-29 18:25:41 -06:00
Joel Dice
84bcbbcaa3 implement asReadOnlyBuffer and getShort(int) in ByteBuffer 2011-09-29 18:25:03 -06:00
Joel Dice
61457dca70 add workaround for buffer overflow on iOS Simulator
It seems that the Apple iOS Simulator's stat implementation writes
beyond the end of the struct stat we pass it, which can clobber
unrelated parts of the stack.  Perhaps this is due to some kind of
header/library mismatch, but I've been unable to track it down so far.
The workaround is to give it 8 words more than it should need, where 8
is a number I just made up and seems to work.
2011-09-29 18:23:15 -06:00
Joel Dice
4e4d109787 fix regression in static field offset calculation
One of the changes in commit 5b4f179 broke this calculation.
2011-09-28 11:12:21 -06:00
Joel Dice
0372d999d3 use TargetBytesPerWord instead of BytesPerWord where appropriate 2011-09-23 23:25:52 -06:00
Joel Dice
3fa4a7001d fix x86->powerpc boot image cross build
This fixes the remaining cross-endian translation issues needed to
build powerpc boot images on x86.
2011-09-23 22:31:24 -06:00
Joel Dice
e6c780e4e8 whitespace tweak for usage message in bootimage.cpp 2011-09-23 22:31:24 -06:00
Joel Dice
21d1a6c883 add __attribute__ ((used)) to EXPORT macro definition
This ensures that exported functions are not stripped when using the
-dead_strip option to the Apple linker.
2011-09-22 16:57:44 -06:00
Joel Dice
70c65c7053 update bootimage instructions in readme.txt 2011-09-20 20:03:16 -06:00
Joel Dice
559af69269 various ARM fixes 2011-09-20 19:50:38 -06:00
Joel Dice
c537dcfd34 generate read-only code image in bootimage build
This avoids the requirement of putting the code image in a
section/segment which is both writable and executable, which is good
for security and avoids trouble with systems like iOS which disallow
such things.

The implementation relies on relative addressing such that the offset
of the desired address is fixed as a compile-time constant relative to
the start of the memory area of interest (e.g. the code image, heap
image, or thunk table).  At runtime, the base pointer to the memory
area is retrieved from the thread structure and added to the offset to
compute the final address.  Using the thread pointer allows us to
generate read-only, position-independent code while avoiding the use
of IP-relative addressing, which is not available on all
architectures.
2011-09-20 16:30:30 -06:00
Joel Dice
349d381d95 progress towards cross-endian bootimage builds
This fixes a number of bugs concerning cross-architecture bootimage
builds involving diffent endianesses.  There will be more work to do
before it works.
2011-09-16 20:53:08 -06:00
Joel Dice
178dd7af34 Merge remote branch 'origin/master' into ios 2011-09-16 20:46:03 -06:00
Joel Dice
d342c9b8c5 fix 64-bit Windows openjdk-src build 2011-09-16 19:01:14 -06:00
Joel Dice
029a9ca507 fix MinGW (non-w64) build
Commit a2dca0dc fixed the MinGW-w64 openjdk-src build but broke the
traditional MinGW build.  This should ensure that both work.
2011-09-16 18:42:18 -06:00
Joel Dice
916c96c2b9 fix access violation introduced in last commit 2011-09-14 13:27:17 -06:00
Brian Haar
446c09dd33 Fix for File.length() integer overflow on 32-bit Windows.
The File.length() method was returning a signed 32-bit value
on 32-bit Windows systems.  This was causing an integer overflow
on file sizes greater than 2 GB.  This appears to be caused by
the way Windows handles the STAT() function.  This patch checks
whether the current platform is Windows then uses the Windows API
to get the correct file size and return it as a jlong.
2011-09-14 13:18:20 -06:00
Joel Dice
ab840c91db Merge branch 'oss-master' into ios 2011-09-12 20:27:59 -06:00
Joel Dice
be01e5b687 fix handling of 64-bit arguments to Method.invoke on 32-bit architectures
The previous code failed to account for alignment padding in the
Double and Long classes.
2011-09-12 20:26:32 -06:00
Joel Dice
8a30efc52f only generate crash dumps for access violations and divides-by-zero
Some apps and libraries may generate recoverable SEH exceptions on
Windows, in which cases we don't want to waste time and disk space
generating memory dumps.
2011-09-12 13:45:21 -06:00
Joel Dice
84a6daa400 fix unused parameter warning 2011-09-01 11:36:00 -06:00
Joel Dice
66bc326523 Merge branch 'cross-bootimage' into ios 2011-09-01 10:53:39 -06:00
Joel Dice
6949fc3d60 Merge remote-tracking branch 'origin/master' into ios 2011-09-01 10:53:20 -06:00
Joel Dice
e3fc8d3dd2 enable cross-architecture ARM bootimage builds 2011-09-01 10:51:56 -06:00
Joel Dice
8c9bfccb9e Merge remote branch 'origin/bufferedReaderFix' into oss-master 2011-09-01 09:37:10 -06:00
Seth Goings
fb3a23f02d Fixed behavior of readLine accepting *\n\n as a line, not two 2011-09-01 09:31:08 -06:00
Seth Goings
97e03b9f28 Fixed possible ArrayIndexOutOfBounds exception 2011-09-01 09:11:39 -06:00
Joel Dice
e505cbe99d more progress towards cross-architecture bootimage builds
This commit fixes a lot of bugs.  All tests are now pass for Linux
x86_64 to Linux i386 cross builds.
2011-08-31 21:18:00 -06:00
Joel Dice
5d55d61c17 fix use of uninitalized memory in jnienv.cpp 2011-08-31 21:16:22 -06:00
Joel Dice
67300c229a change local variable name to avoid shadowing another variable 2011-08-31 21:15:41 -06:00
Seth Goings
c75b06ddc1 Added support for non POSIX line endings. Will now accept: \r and \r\n as line endings (per Sun's JavaDoc) 2011-08-31 20:46:15 -06:00
Joel Dice
6923c74c4c Merge branch 'ios' of oss:/var/local/git/avian into ios
Conflicts:
	makefile
2011-08-29 19:07:42 -06:00
Joel Dice
5b4f17997f progress towards cross-architecture bootimage builds
This monster commit is the first step towards supporting
cross-architecture bootimage builds.  The challenge is to build a heap
and code image for the target platform where the word size and
endianess may differ from those of the build architecture.  That means
the memory layout of objects may differ due to alignment and size
differences, so we can't just copy objects into the heap image
unchanged; we must copy field by field, resizing values, reversing
endianess and shifting offsets as necessary.

This commit also removes POD (plain old data) type support from the
type generator because it added a lot of complication and little
value.
2011-08-29 19:00:17 -06:00
Joel Dice
f0cb26ec51 treat carriage returns as whitespace when parsing types.def
On Windows, some versions of Git automatically translate Unix line
endings to Windows line endings, which can break the build unless we
treat carriage returns as whitespace when parsing.
2011-08-29 14:31:30 -06:00
Joel Dice
9522842b4b support cross builds on OS X to non-Mac targets 2011-08-23 17:04:04 -06:00
Joel Dice
4c47f4fae8 Merge remote-tracking branch 'origin/master' into ios 2011-08-23 16:40:01 -06:00
Joel Dice
d09e5ee8eb fix Windows build regression 2011-08-15 16:37:15 -06:00
Anonymous
16aa5c3d59 improve IOException message in the case of a Runtime.exec() failure
We now properly forward the errno value from the child when execvp()
fails, which the parent then uses to for the errno message as well as
including the failed command's name in the message.
2011-08-15 07:12:52 -06:00
Joel Dice
b4661d2ccd Merge remote branch 'origin/master' into ios 2011-08-15 07:09:44 -06:00
Joel Dice
1c59aa51d8 add fields and methods to AbstractList for compatibility
Google Protocol Buffers relies on these.
2011-08-12 14:29:22 -06:00
Joel Dice
3df3892d34 throw AbstractMethodError when appropriate in prepareMethodForCall
Otherwise, we'll crash later when we try to compile an abstract
method.
2011-08-12 14:19:21 -06:00