Skip to content

Fix segmentation fault when calling ZstdOutputStream#setDict(ZstdDictCompress) with null#356

Merged
luben merged 1 commit intoluben:masterfrom
garydgregory:fix_segmentation_fault_ZstdOutputStream_setDict
Apr 23, 2025
Merged

Fix segmentation fault when calling ZstdOutputStream#setDict(ZstdDictCompress) with null#356
luben merged 1 commit intoluben:masterfrom
garydgregory:fix_segmentation_fault_ZstdOutputStream_setDict

Conversation

@garydgregory
Copy link
Copy Markdown
Contributor

Fix segmentation fault when calling ZstdOutputStream#setDict(ZstdDictCompress) with null

For example:

💣 Program crashed: Bad pointer dereference at 0x0000000000000000

Thread 73 "Java: pool-18-thread-15-ScalaTest-running-ZstdSpec" crashed:

 0 0x0000000103077460 AccessInternal::PostRuntimeDispatch<G1BarrierSet::AccessBarrier<1097844ull, G1BarrierSet>, (AccessInternal::BarrierType)2, 1097844ull>::oop_access_barrier(void*) + 8 in libjvm.dylib
 1 0x00000001031c495c jni_GetObjectClass + 184 in libjvm.dylib
 2 0x000000012800bbfc
 3 0x0000000128006ab0
 4 0x0000000128006ee0
 5 0x0000000128006ee0
 6 0x0000000128006ee0
 7 0x0000000128006fc8
 8 0x0000000128006ee0
 9 0x0000000128006ee0
10 0x0000000128006ee0
11 0x0000000128006ee0
12 0x0000000128006fc8
13 0x0000000128006fc8
14 0x0000000128006ee0
15 0x0000000128006ee0
16 0x0000000128006fc8
17 0x0000000128006ee0
18 0x0000000128006ee0
19 0x0000000128006fc8
20 0x0000000128006ee0
21 0x0000000128006ee0
22 0x0000000128006ee0
23 0x0000000128006fc8
24 0x0000000128006ee0
25 0x0000000128006fc8
26 0x0000000128006ee0
27 0x000000012b8e8680
28 0x000000012800719c
29 0x0000000128006ee0
30 0x0000000128006ee0
31 0x0000000128006fc8
32 0x000000012800719c
33 0x000000012800719c
34 0x0000000128006ee0
35 0x0000000128006ee0
36 0x0000000128006ee0
37 0x0000000128006ee0
38 0x0000000128006fc8
39 0x0000000128006ee0
40 0x0000000128006ee0
41 0x0000000128006fc8
42 0x0000000128006ee0
43 0x0000000128006fc8
44 0x0000000128006ee0
45 0x0000000128006ee0
46 0x0000000128006ee0
47 0x0000000128006fc8
48 0x0000000128006ee0
49 0x0000000128006fc8
50 0x0000000128006ee0
51 0x0000000128006ee0
52 0x0000000128006ee0
53 0x0000000128006fc8
54 0x0000000128006ee0
55 0x0000000128006ee0
56 0x0000000128006fc8
57 0x0000000128006ee0
58 0x0000000128006ee0
59 0x0000000128006ee0
60 0x0000000128006fc8
61 0x0000000128006ee0

Backtrace took 9.14s

>>> 
>>> quit
zsh: segmentation fault  sbt compile test package

garydgregory added a commit to garydgregory/commons-compress that referenced this pull request Apr 20, 2025
zstd options

- Avoid JVM segmentation fault in zstd-jni 1.5.7-2
See also luben/zstd-jni#356
- Deprecate constructors except the classic one-argument constructor
- Add tests
- Better Javadocs
garydgregory added a commit to garydgregory/commons-compress that referenced this pull request Apr 22, 2025
zstd options

- Avoid JVM segmentation fault in zstd-jni 1.5.7-2
See also luben/zstd-jni#356
- Deprecate constructors except the classic one-argument constructor
- Add tests
- Better Javadocs
garydgregory added a commit to garydgregory/commons-compress that referenced this pull request Apr 23, 2025
zstd options

- Avoid JVM segmentation fault in zstd-jni 1.5.7-2
See also luben/zstd-jni#356
- Deprecate constructors except the classic one-argument constructor
- Add tests
- Better Javadocs
garydgregory added a commit to apache/commons-compress that referenced this pull request Apr 23, 2025
…666)

zstd options

- Avoid JVM segmentation fault in zstd-jni 1.5.7-2
See also luben/zstd-jni#356
- Deprecate constructors except the classic one-argument constructor
- Add tests
- Better Javadocs
@luben
Copy link
Copy Markdown
Owner

luben commented Apr 23, 2025

Aaa, great. Looks we missed that.

@luben luben merged commit 6549913 into luben:master Apr 23, 2025
@luben
Copy link
Copy Markdown
Owner

luben commented Apr 23, 2025

I will release it this weekend.

@garydgregory garydgregory deleted the fix_segmentation_fault_ZstdOutputStream_setDict branch May 2, 2025 16:55
@garydgregory
Copy link
Copy Markdown
Contributor Author

Hi @luben

Would you set expectations for a release time frame please? ⏰️🙏

@luben
Copy link
Copy Markdown
Owner

luben commented May 2, 2025

I will release it this weekend

garydgregory added a commit to apache/commons-compress that referenced this pull request May 3, 2025
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.

2 participants