Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GETFIELD fix + side adjustments #100

Closed
wants to merge 0 commits into from
Closed

GETFIELD fix + side adjustments #100

wants to merge 0 commits into from

Conversation

texadactyl
Copy link
Collaborator

GETFIELD fix per debugging with Unka Andoo.

And, when ya push here, sometimes something else pops up down there! (:

  • run.go GETFIELD: If the field type is a string, wrap it in an object and push the object address onto the stack.
  • run.go ARRAYLENGTH: Pointer to an array of objects is also a possibility.
  • javaIoPrintStream.go Println: Be prepared for *object.Object as well as *[]byte.
  • javaIoPrintStream.go PrintS: Ditto.

@texadactyl
Copy link
Collaborator Author

texadactyl commented Nov 17, 2023

I rolled back a GETFIELD mod to also objectify arrays of primitives. It didn't push us past W-L 39-57 and it blew up some unit tests. I need to find another way.

@texadactyl
Copy link
Collaborator Author

In GETFIELD and BALOAD, I had seen some invalid object reference types. Now called out with exception should this happen again.

@texadactyl
Copy link
Collaborator Author

texadactyl commented Nov 17, 2023

Interface conversion panics are down to 4 but those test cases have moved onto other fun. Looks like we are left with some sort of statics trouble as we have already discussed (nil presented but *object.Object expected):

========================================
go panic because of interface conversion
========================================
FAILED.JACOBIN-0206-nbody.jacobin.log: error: go panic because of interface conversion: interface {} is nil, not *object.Object
FAILED.desi.jacobin.log: error: go panic because of interface conversion: interface {} is nil, not *object.Object
FAILED.kalman-filtering.jacobin.log: error: go panic because of interface conversion: interface {} is nil, not *object.Object
FAILED.scimark2.jacobin.log: error: go panic because of interface conversion: interface {} is nil, not *object.Object
--- Total: 4

Still, W-L 39-57.

@texadactyl
Copy link
Collaborator Author

texadactyl commented Nov 17, 2023

I do not like these at all:

=====================================
runtime error: invalid memory address
=====================================
FAILED.JACOBIN-0211-pbcrypto.jacobin.log: error: go panic because of runtime error: invalid memory address or nil pointer dereference
FAILED.blockchain.jacobin.log: error: go panic because of runtime error: invalid memory address or nil pointer dereference
FAILED.enigma-machine.jacobin.log: error: go panic because of runtime error: invalid memory address or nil pointer dereference
FAILED.imageio-output.jacobin.log: error: go panic because of runtime error: invalid memory address or nil pointer dereference
FAILED.java17-enhancements.jacobin.log: error: go panic because of runtime error: invalid memory address or nil pointer dereference
FAILED.math-in-java-source.jacobin.log: error: go panic because of runtime error: invalid memory address or nil pointer dereference
FAILED.rsa-unrandom.jacobin.log: error: go panic because of runtime error: invalid memory address or nil pointer dereference
FAILED.sha3.jacobin.log: error: go panic because of runtime error: invalid memory address or nil pointer dereference
FAILED.two-fish.jacobin.log: error: go panic because of runtime error: invalid memory address or nil pointer dereference
--- Total: 9

Hmmm I may have a fix.

@texadactyl
Copy link
Collaborator Author

Last jacotest summary:

Success in 39 test cases
	 JACOBIN-0161-instantiate-class
	 JACOBIN-0212-bit-shifting
	 JACOBIN-0217-multidim-2d
	 JACOBIN-0217-multidim-3d
	 JACOBIN-0227-string-array
	 JACOBIN-0231-stats
	 JACOBIN-0234-0240-0241-array-length
	 JACOBIN-0236-bitwise
	 JACOBIN-0236-minus-signs
	 JACOBIN-0237-nil-printlns
	 JACOBIN-0251-array-type-perf
	 JACOBIN-0280-string-writer
	 JACOBIN-0281-get-property
	 JACOBIN-0288-aastore-field-type
	 JACOBIN-0289-checkcast
	 JACOBIN-0290-string-length
	 JACOBIN-0293-drem
	 JACOBIN-0301-putstatic
	 JACOBIN-0311-for-loop-G-pop
	 JACOBIN-0312-FCMPG
	 JACOBIN-0314-java-lang-math
	 JACOBIN-0314-java-lang-strictmath
	 JACOBIN-0314-loop-survival
	 JACOBIN-0319-println-object
	 JACOBIN-0325-super-1
	 JACOBIN-0329-nonfinals
	 JACOBIN-0369-getbytes
	 JACOBIN-0369-simplified-0290
	 JACOBIN-0393-pot-pourri
	 JACOBIN-0393-two-strings
	 arrays-1
	 casting
	 cmath-in-java-source
	 nth-root
	 packaging-1
	 packaging-2
	 recursion
	 specrel
	 stringer-valueof
No Compilation errors
No Execution timeout errors
Execution failure errors in 57 test cases

========================================
Invalid type of object ref
========================================
FAILED.JACOBIN-0211-pbcrypto.jacobin.log: GETFIELD: Invalid type of object ref: <nil>
FAILED.blockchain.jacobin.log: GETFIELD: Invalid type of object ref: <nil>
FAILED.enigma-machine.jacobin.log: GETFIELD: Invalid type of object ref: <nil>
FAILED.imageio-output.jacobin.log: GETFIELD: Invalid type of object ref: <nil>
FAILED.java17-enhancements.jacobin.log: GETFIELD: Invalid type of object ref: int64
FAILED.math-in-java-source.jacobin.log: GETFIELD: Invalid type of object ref: <nil>
FAILED.rsa-unrandom.jacobin.log: GETFIELD: Invalid type of object ref: <nil>
FAILED.sha3.jacobin.log: GETFIELD: Invalid type of object ref: <nil>
FAILED.two-fish.jacobin.log: GETFIELD: Invalid type of object ref: <nil>
--- Total: 9

========================================
go panic because of interface conversion
========================================
FAILED.JACOBIN-0206-nbody.jacobin.log: error: go panic because of interface conversion: interface {} is nil, not *object.Object
FAILED.desi.jacobin.log: error: go panic because of interface conversion: interface {} is nil, not *object.Object
FAILED.kalman-filtering.jacobin.log: error: go panic because of interface conversion: interface {} is nil, not *object.Object
FAILED.scimark2.jacobin.log: error: go panic because of interface conversion: interface {} is nil, not *object.Object
--- Total: 4

=====================================
is not castable with respect to
=====================================
FAILED.JACOBIN-0310-vector-survivor.jacobin.log: CHECKCAST: [Ljava/lang/Object; is not castable with respect to [Ljava/lang/Integer
FAILED.JACOBIN-0310-vector-survivor.jacobin.log: error: go panic because of CHECKCAST: [Ljava/lang/Object; is not castable with respect to [Ljava/lang/Integer
FAILED.vectors.jacobin.log: CHECKCAST: [Ljava/lang/Object; is not castable with respect to [Ljava/lang/Integer
FAILED.vectors.jacobin.log: error: go panic because of CHECKCAST: [Ljava/lang/Object; is not castable with respect to [Ljava/lang/Integer
--- Total: 4

=====================================
go panic because of javaPrimitives
=====================================
FAILED.catch-exception.jacobin.log: error: go panic because of javaPrimitives.integerParseInt: arg=ABC, radix=10, err: strconv.ParseInt: parsing "ABC": invalid syntax
FAILED.finally.jacobin.log: error: go panic because of javaPrimitives.doubleParseDouble Error(): strconv.ParseFloat: parsing "foobar": invalid syntax
FAILED.parse-int.jacobin.log: error: go panic because of javaPrimitives.integerParseInt: arg=99, radix=8, err: strconv.ParseInt: parsing "99": invalid syntax
--- Total: 3

==============
AssertionError
==============
FAILED.catch-assertion-error.jacobin.log: *** ERROR, failed to catch the AssertionError
--- Total: 1

======================================
INVOKEVIRTUAL: Native method requested
======================================
FAILED.elliptic.jacobin.log: INVOKEVIRTUAL: Native method requested: jdk/internal/misc/Unsafe.getIntVolatile
FAILED.rsa-mini.jacobin.log: INVOKEVIRTUAL: Native method requested: java/lang/Object.getClass
FAILED.tls-one-way.jacobin.log: INVOKEVIRTUAL: Native method requested: jdk/internal/misc/Unsafe.getIntVolatile
--- Total: 3

================
stack underflow
================
FAILED.JACOBIN-0294-system-exit.jacobin.log: error: go panic because of stack underflow
FAILED.JACOBIN-0322-throw-null.jacobin.log: error: go panic because of stack underflow
FAILED.charset-encoding.jacobin.log: error: go panic because of stack underflow
FAILED.jarring.jacobin.log: error: go panic because of stack underflow
FAILED.nio-charset.jacobin.log: error: go panic because of stack underflow
FAILED.user-defined-exception.jacobin.log: error: go panic because of stack underflow
--- Total: 6

================
stack overflow
================
FAILED.JACOBIN-0322-default-locale.jacobin.log: error: go panic because of stack overflow
FAILED.JACOBIN-0386-0387-strings-again.jacobin.log: error: go panic because of stack overflow
FAILED.stringer-2.jacobin.log: error: go panic because of stack overflow
--- Total: 3

================
invalid bytecode
================
FAILED.JACOBIN-0279-simple-switch.jacobin.log: Invalid bytecode found: 170 (0xAA)(TABLESWITCH) at location 16 in method main() of class main
FAILED.dedupe-hacked.jacobin.log: Invalid bytecode found: 185 (0xB9)(INVOKEINTERFACE) at location 23 in method main() of class main
FAILED.lambdas-maps.jacobin.log: Invalid bytecode found: 186 (0xBA)(INVOKEDYNAMIC) at location 10 in method main() of class main
FAILED.merkletrees.jacobin.log: Invalid bytecode found: 186 (0xBA)(INVOKEDYNAMIC) at location 71 in method main() of class main
FAILED.playfair.jacobin.log: Invalid bytecode found: 186 (0xBA)(INVOKEDYNAMIC) at location 61 in method main() of class main
FAILED.stringer-1.jacobin.log: Invalid bytecode found: 185 (0xB9)(INVOKEINTERFACE) at location 2 in method contains() of class java/lang/String
FAILED.vector-survivor-2.jacobin.log: Invalid bytecode found: 185 (0xB9)(INVOKEINTERFACE) at location 5 in method <init>() of class java/util/Vector
--- Total: 7

===========================
PUTSTATIC: field 
===========================
FAILED.JACOBIN-0263-gc.jacobin.log: PUTSTATIC: field java/math/MathContext.DEFAULT_ROUNDINGMODE, type unrecognized: <nil>
FAILED.perf-base-instantiate.jacobin.log: PUTSTATIC: field java/io/BufferedInputStream.U, type unrecognized: <nil>
--- Total: 2

===========================
PUTFIELD: invalid attempt
===========================
FAILED.JACOBIN-0296-new-fileinputstream.jacobin.log: PUTFIELD: invalid attempt to update a static variable in java/io/File.<init>
FAILED.emission-line-spectra.jacobin.log: PUTFIELD: invalid attempt to update a static variable in java/io/File.<init>
FAILED.fits.jacobin.log: PUTFIELD: invalid attempt to update a static variable in java/io/File.<init>
FAILED.solitairgraphy.jacobin.log: PUTFIELD: invalid attempt to update a static variable in Deck.<init>
FAILED.taylor-series.jacobin.log: PUTFIELD: invalid attempt to update a static variable in RationalPolynomial.<init>
FAILED.two-pass.jacobin.log: PUTFIELD: invalid attempt to update a static variable in java/io/File.<init>
FAILED.zippy.jacobin.log: PUTFIELD: invalid attempt to update a static variable in java/io/File.<init>
--- Total: 7

=============================
Class method not found
=============================
FAILED.JACOBIN-0161-0229-classes.jacobin.log: INVOKEVIRTUAL: Class method not found: main$Insider.gimmeString
FAILED.JACOBIN-0325-super-2.jacobin.log: Car constructor: I am a type of INVOKEVIRTUAL: Class method not found: Car.getCategory
FAILED.sockets.jacobin.log: INVOKEVIRTUAL: Class method not found: java/lang/StringBuilder.isLatin1
FAILED.threading.jacobin.log: INVOKEVIRTUAL: Class method not found: java/lang/StringBuilder.isLatin1
--- Total: 4

=================================
runtime error: index out of range
=================================
FAILED.JACOBIN-0337-static-inits.jacobin.log: error: go panic because of runtime error: index out of range [3] with length 3
FAILED.array-list-iterator.jacobin.log: error: go panic because of runtime error: index out of range [0] with length 0
FAILED.hashed-map.jacobin.log: error: go panic because of runtime error: index out of range [7] with length 4
FAILED.hashed-set.jacobin.log: error: go panic because of runtime error: index out of range [0] with length 0
FAILED.linked-list.jacobin.log: error: go panic because of runtime error: index out of range [5] with length 3
FAILED.numbers-chars-strings.jacobin.log: error: go panic because of runtime error: index out of range [6] with length 1
--- Total: 6

@texadactyl
Copy link
Collaborator Author

Maybe, its time to go to school on GETSTATIC?

@texadactyl texadactyl closed this Nov 18, 2023
@texadactyl
Copy link
Collaborator Author

Closed due to a source conflict (GETFIELD).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant