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

Fix #2626, #2623: handle socket fields sin6_len & sin_len, when present on OS #2734

Merged

Conversation

LeeTibbert
Copy link
Contributor

Two socket fields, sin6_len & sin_len which are commonly available on BSD-derived
systems, such as macOS & FreeBSD, are now handled correctly.

Two new tests InTest.scala and In6Test.scala are introduced to verify the changes.

A benefit of this now proper handling is that socket methods sendto() and recvfrom() work correctly
on those two operating systems (Issue #2623, fixed on Linux & Windows in a prior PR.)

@LeeTibbert LeeTibbert changed the title Fix #2626, #2623: handle socket fields sin6_len & sin_len, when present WIP: Fix #2626, #2623: handle socket fields sin6_len & sin_len, when present Jul 17, 2022
@LeeTibbert
Copy link
Contributor Author

LeeTibbert commented Jul 17, 2022

Moving to Work In Progress (WIP). CI revealed an error.
I want to take my time to understand it and come up
with a proper fix. I have a hack fix in my sandbox, so I know there is at least one
solution.

@LeeTibbert LeeTibbert force-pushed the PR_posix_SysSocket_SinXLen_I2626 branch from 80bd7c5 to 436742b Compare July 17, 2022 17:54
@LeeTibbert LeeTibbert changed the title WIP: Fix #2626, #2623: handle socket fields sin6_len & sin_len, when present Fix #2626, #2623: handle socket fields sin6_len & sin_len, when present on OS Jul 17, 2022
@LeeTibbert
Copy link
Contributor Author

Modulo a few spurious CI errors, this PR is ready for review.

Partest is reliably (> 50%) killing qemu. The SEGFAULT
appears to happen after a Java garbage collection, usually
with commix. Commix doesn't like memory pressure?
Use G1GC (in .sbtopts)? Specify more memory (in .sbtopts)?
Skip Partest on qemu?

I got 83 out of 85. One apparently hung linux test, and one
failing qemu arm64. Everybody else was green.

I am firing off another CI run and will check it later.
I am pretty certain the bugs are in CI and no longer mine,
(earlier CI did catch real macOS bugs in my code).

Copy link
Contributor

@WojciechMazur WojciechMazur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, I believe the issues in the CI are not related to this change

@WojciechMazur WojciechMazur merged commit 78d2be5 into scala-native:main Jul 19, 2022
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.

None yet

2 participants