Skip to content

Memory leak in Prf #53

Closed
Closed
@behrooz-stripe

Description

@behrooz-stripe

Help us help you

We'd like to know more about
your Tink deployment.

Describe the bug:

Memory leak in Tink Prf Java See here for detailed description: #52

What was the expected behavior?

Not to drain memory in repetitive calls to prf.compute().

How can we reproduce the bug?

See here for reproducing steps: #52

Do you have any debugging information?
Using memory profiler this is the leak stacktrace:

 java.lang.Thread.State: RUNNABLE
	at jdk.internal.misc.Unsafe.allocateMemory0([email protected]/Native Method)
	at jdk.internal.misc.Unsafe.allocateMemory([email protected]/Unsafe.java:630)
	at java.nio.DirectByteBuffer.<init>([email protected]/DirectByteBuffer.java:125)
	at java.nio.ByteBuffer.allocateDirect([email protected]/ByteBuffer.java:332)
	at com.google.crypto.tink.subtle.prf.HkdfStreamingPrf$HkdfInputStream.initialize(HkdfStreamingPrf.java:88)
	at com.google.crypto.tink.subtle.prf.HkdfStreamingPrf$HkdfInputStream.read(HkdfStreamingPrf.java:129)
	at com.google.crypto.tink.subtle.prf.PrfImpl.readBytesFromStream(PrfImpl.java:45)
	at com.google.crypto.tink.subtle.prf.PrfImpl.compute(PrfImpl.java:67)
	at com.google.crypto.tink.prf.PrfSet.computePrimary(PrfSet.java:44)

See here for
What version of Tink are you using?

For example, 1.7.0. but it's present on master too.

Can you tell us more about your development environment?

Such as JDK 8

Is there anything else you'd like to add?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions