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 #2921: Commix Heap.c now compiles with Clang 15.0.3 #2922

Merged
merged 1 commit into from Oct 21, 2022

Conversation

LeeTibbert
Copy link
Contributor

Fix #2921

Recent PR #2890 changed the prototype for WeakRefGreyList_CallHandlers() so that
the prototype match its implementation. That satisfied Clang 15.0.1.

This PR changes the call site to match the prototype and satisfies the more
stringent checking of Clang 15.0.3.

@LeeTibbert LeeTibbert added component:gc backport candidate PR which might be backported into previous major release of SN labels Oct 19, 2022
@LeeTibbert
Copy link
Contributor Author

@markehammons

If you have some time, could you review this and see if you concur with the change?
Thank you. If you are flat out, I more than understand.

@LeeTibbert LeeTibbert changed the title Fix #2921: Commix Heap.c now compies with Clang 15.0.3 Fix #2921: Commix Heap.c now compiles with Clang 15.0.3 Oct 20, 2022
@ekrich
Copy link
Member

ekrich commented Oct 20, 2022

Wow, that much of a change from 15.0.1 to 15.0.3 - your change looks fine to me.

@LeeTibbert
Copy link
Contributor Author

Eric, thank you for the review & confirmation.

I believe that LLVM 15.0.n started or continued adding C2x support, which appears
to be stricter. I think that markehammons got gored by one horn in 15.0.1 and I got
gored by the other one in 15.0.3 a month or so later.

Actually here, that strictness did us a favor.

@WojciechMazur WojciechMazur merged commit 8c9b652 into scala-native:main Oct 21, 2022
WojciechMazur pushed a commit to WojciechMazur/scala-native that referenced this pull request Nov 1, 2022
WojciechMazur added a commit that referenced this pull request Nov 9, 2022
* Update scalafmt to 3.5.9 (#2862)

* Update scalafmt to 3.5.9

* Use .scalafmt.conf version in script

* Remove quotes around version

(cherry picked from commit 87361fb)

* Adding missing `java.lang.Character` functionality (#2871)

* Added highSurrogate and lowSurrofate to java.lang.Character extraced from toSurrogate

* Added tests for highSurrogate and lowSurrogate

(cherry picked from commit 9a043fd)

* Update ReferenceQueue.scala (#2878)

Remove stub annotation import

(cherry picked from commit ff62fe4)

* Fix header definition of Commix WeakRefGreyList (#2890)

This addresses #2889

(cherry picked from commit ae27796)

* Update Scala versions in the builds (#2896)

* Add Scala 2.12.17 and Scala 2.13.10
* Update versions used in the CI
* Remove depereactions in nscplugin
* Update settings to handle deprecations
* Update scalalib patches
* Update partest files
* Increase timeout for multiarch builds
* Fix source incompatibilites for CommandLineParser
* Fix ambigious import (Scala 2.12.17 fix)
* Fix java release settings + disable source flag in tests
* Add missing partest junit test files
* Fix scripted tests config
* Disable failing BigIntTest in unoptimzied code

(cherry picked from commit 5438abb)

* Fix I2892: Implement sys/select pselect method (#2895)

(cherry picked from commit 427fea4)

* Update sbt to 1.7.2 (#2859)

* Update sbt to 1.7.2

(cherry picked from commit f509b38)

* Towards an independent javalib #1 (#2887)

* ScalaOps deprecations and removed methods

* Update UnixProcess

* Update WindowsProcess

* Update Collections from Scala.js

* Update AbstractMap and update ScalaOps

* Minor cosmetic updates

* Update File, remove unused private classes

* Remove from generated docs

* Remove compile errors and touch up toString

* Revert javalib deprecation setting

* Use scalaOps for a code simplification

* Add CollectionsTest and adapt for use

* Update AbstractMapTest, cosmetic only

* Move AssertThrows to new package

* Fix package for tests-ext

* Missed one bad substitution

(cherry picked from commit 48b3342)

* Fix #2891: posixlib spawn is now implemented. (#2894)

* Fix #2891: Implement posixlib spawn.scala

* Job is not done until the documentation is updated

* Delete include to keep Scala 2.12.16 happy

(cherry picked from commit ba9ab71)

* Port `j.u.ArrayDeque` from JSR 166 (#2898)

* Port `ArrayDeque` from JSR 166
* Port JSR 166 tests
* Add `Spliterator` interface

(cherry picked from commit 8df8499)

* Fix #1826: Add documentation for GC settings (#2910)

* Add info for None GC and more detail
* Fix #1826: Add documentation for GC settings

(cherry picked from commit 40a2330)

* Fix two sets of quality preception diminishing typos (#2914)

(cherry picked from commit faba287)

* Fix #2903: Avoid systematic checking of String integrity in IEEE754Helpers (#2907)

(cherry picked from commit 8d491c5)

* Fix #2921: Commix Heap.c now compies with Clang 15.0.3 (#2922)

(cherry picked from commit 8c9b652)

* Fix #2678: Provide examples of using NativeConfig (#2926)

(cherry picked from commit b617b3e)

* Fix #2927: Expunge non-JVM j.l.String#getValue() (#2928)

(cherry picked from commit a6109a6)

* Fix #I2925: A j.l.String constructor now yields immutable strings (#2929)

* Fix #I2925: A j.l.String constructor now generates immutable strings

* Add tests writted by David Bouyssie

(cherry picked from commit e4705a9)

* Don't unapply unecessary unboxing in lambdas (#2938)

* Add reproducer for issues 2880

* Make sure no unnecessary unboxing would be applied to primitive types

* Fix build to allow testing with Scala 2.11

* Revert "Fix build to allow testing with Scala 2.11"

This reverts commit 28fe4b8.

* Use experimantal mode in NIRcompiler for tests

* Replace ammonite script with scala-cli due to depreacted node.js runner in actions

(cherry picked from commit 207d2a7)

* Fix CI deprecation warnings and multiach builds (#2939)

* Update ations/cache to v3
* Replaced deprecated set-output commands
* Replace ammonite script with scala-cli due to depreacted node.js runner in actions
* Fix codegen bug for x86 architectures
* Refactor multiarch CI builds

(cherry picked from commit 864efc0)

* Fix #2943: Provide smarter & faster ProcessTest method (#2944)

(cherry picked from commit 2567ca9)

* Fix #2935: Ensure StringBuilder does not alter existing child Strings (#2936)

(cherry picked from commit 6cbe5cc)

* Add additional javalib String immutability tests (#2934)

(cherry picked from commit 3ab6eac)

* Enable the use of memcpy in IEEE754Helpers.bytesToCString (#2941)

* Some changes to enable use of memcpy in IEEE754Helpers.bytesToCString:
* replace while loop by `memcpy()` call
* throw NumberFormatException when String is empty (otherwise bytesToCString would throw ArrayIndexOutOfBoundsException)
* replace `var res = f(cStr, end)` by `val res = f(cStr, end)` (var not needed there)

* PR2941: use Ptr/Array conversion instead of Ptr arithmetic

(cherry picked from commit 317ff28)

* Optimize method `AbstractStringBuilder.append0(CharSequence, Int, Int)` (#2909)

* Optimize method `AbstractStringBuilder.append0(CharSequence, Int, Int)`

For reference, see equivalent Android libcore2 implementation (Apache 2 license) at:
https://android.googlesource.com/platform/libcore2/+/master/luni/src/main/java/java/lang/AbstractStringBuilder.java#151

* Revert last commit

* Optimize method `AbstractStringBuilder.append0(CharSequence, Int, Int)`

For reference, see equivalent Android libcore2 implementation (Apache 2 license) at:
https://android.googlesource.com/platform/libcore2/+/master/luni/src/main/java/java/lang/AbstractStringBuilder.java#151

* Update attribution to Android Luni in License.md

* Mention Android Luni

* Format code

* Fix NPE

* Changes relative to recent reviewer suggestions:
* replace `string.length()` by `string.count` to improve code understanding
* add unit tests in StringBufferTest.scala and StringBuilderTest.scala to ensure String immutability when doing SB.toString followed by SB modification

* Another commit (WIP for issue #2930)

(cherry picked from commit abf7dcf)

* Install ping for ProcessTest (#2945)

(cherry picked from commit 967c262)

* Fix build after cherry-picking

* Add Scala 3.2.1 to cross versions

* Fix encoding of `scala.Nothing` and `scala.Null` in type signatures (#2949)

* Reproduce issue #2858

* Fix encoding of phantom Scala types Nothing and Null

* Revert spurious changes

(cherry picked from commit 4ca323b)

* Remove non local returns from java.net.URI (#2951)

(cherry picked from commit 24c0039)

* Partial fix #2822: remove non-local returns from j.math.Primality (#2948)

(cherry picked from commit 57612fc)

* Remove deprecated assert idiom from five regex Tests (#2954)

* Remove deprecated assert idiom from two regex Tests

* Remove now unnecessary import of ThrowsHelper

* Remove deprecated assert from three more files

(cherry picked from commit e225653)

* Remove deprecated assert idiom from three java.lang Tests (#2953)

* Remove deprecated idiom from three java.lang Tests

* Remove now unnecessary import

(cherry picked from commit 4872c8b)

* Handle passing null for unboxed arguments of extern methods (#2950)

* Reproduce issue #2866

* Remove redundant build settings

* clenup

(cherry picked from commit 688c0ff)

* Report error when referencing local state in CFuncPtr (#2957)

* Report error upon usage of local state in CFuncPtr

* Fix failing tests and improve Scala 2.11 detections

(cherry picked from commit 6fb8352)

* Use unsafe array ops in `IEEE754Helpers` (#2960)

(cherry picked from commit b9c3d94)

* Fix lost information about value class instance (#2959)

* Reproduce issue `AnyVal` causes segfault #2712

* Make sure to recreate value class instance upon returning from lambda

(cherry picked from commit 584d5c2)

* Use `memcpy` in `{to,from}CString` (#2962)

* Use `memcpy` in `{to,from}CString`

* Guard against 0-length strings

* Fix empty string

* Reuse val

(cherry picked from commit 3150626)

* Remove shebang from scala-cli scripts due to failures in scalafmt (#2961)

* Remove sheband from scala-cli script

* update scalafmt overrides

* run scalafmt in non-interactive mode to limit ammont of logs

* Revert "run scalafmt in non-interactive mode to limit ammont of logs"

This reverts commit 421ace2.

* try fix fialing scalafmt test

(cherry picked from commit 76bec79)

* Encode main class name to match outputs of the compiler (#2955)

* Reproduce issue #2790

* Encode main class to match the outputs of the compiler

* Use scala.reflect.NameTransformer directly instead of reimplementing its logic

* Include package name encoding with exception of dots

* Make sure to create mirror class even if module is not a candidate for forwarders (match JVM codegen in scala compiler)

* Fix failing tools test

(cherry picked from commit 02f38ff)

* Partial fix #2963: Add missing SIGTERM & kin (#2964)

(cherry picked from commit 570e7b4)

* IEEE754Helpers optimizations: stackalloc instead of Zone + String.getBytes removal (#2965)

(cherry picked from commit d8fd989)

* Get rid of compilation warnings in tests and tools using Scala 3 (#2966)

* Extract UnboxEntry class from local scope of Hashtable.entrySet
* Extract local class from ArrayTest
* Reenable fatal warnigns for JVM tests, accept warnings when compiling native tests
* Fix handling deprecations in tools for Scala3
* Supress more warning in tests using Scala3

(cherry picked from commit 396c163)

* Fix #2902: Avoid Array allocation in ieee754tostring implementations (#2917)

* Fix #2902: Avoid Array allocation in ieee754tostring implementations

* Address reviewer suggestions in PR #2917:
* add comment to describe RESULT_STRING_MAX_LENGTH magic numbers
* add private method _xxxToCharsNoCheck() (e.g. isNaN) to avoid redundant checks when calling xxxToString()
* mark xxxToString() methods as @deprecated (note: this line is commented, as it is currently leading to errors in tests)
* add new unit tests in RyuDoubleTest and RyuFloatTest (not asked by the reviewer)
* add unit test in StringBuilderTest
* renamed and reorganize tests in StringBufferTest

* Remove unnecessary @noinline annotations

* Remove methods RyuDouble.doubleToString()/RyuFloat.floatToString() and put simplified versions in RyuDoubleTest/RyuFloatTest

* PR #2902 improvements:
* re-implement Double.toString/Float.toString in order to use RyuDouble.doubleToChars()/RyuFloat.floatToChars()
* simplify doubleToString()/floatToString() example wrappers in unit tests
* Add a note to highlight `result.length - offset >= RESULT_STRING_MAX_LENGTH`

(cherry picked from commit 9446fe6)

* Upgrade to 3.6.1 (#2968)

(cherry picked from commit 6bbcfed)

* CI: Add publishing flow and centralize release logic (#2967)

* Move building aggreation to Build, remove helper bash scripts
* Add publish flow
* add pgp passphrase
* Setup pgp key hanlding
* Set verionSchema for published projects

(cherry picked from commit bcdb50a)

* Fix #2893: Implement posixlib wait.scala (#2969)

* Fix #2893: Implement posixlib wait.scala
* Silly Rabbit! Do not run POSIX tests on Windows

(cherry picked from commit b9a220a)

* Remove -XX:MaxMetaspaceSize flag in scripted tests due to CI failures
A few java.net.Inet*Address fixes (#2877)

* Workaround missing gai_strerror() on Windows
* Re-work InetAddressTest isReachable to avoid Windows specific condition
* Explore getnameinfo() SEGV problem
* Better handling of numeric host storage in getAllByName()

(cherry picked from commit 75b2d6f)

Fix mima binary incompatibilites
Run scalafmt and fix workflows

* Don't allow to execute `runMain` task (#2971)

* Configurable Interflow optimizer  (#2819)

* make sure one method only done once; optimize processor.advance
* add inlineDepth and callersize into config
* add optimizerConfig
* make optimizer configuatable

Co-authored-by: yuly <yuly16@mails.tsinghua.edu.cn>
Co-authored-by: Wojciech Mazur <wojciech.mazur95@gmail.com>
(cherry picked from commit ca81ba6)

* Allow to link as dynamic library (#2145)

* Bootstrap support for building shared library in config
* Allow linking to shared library
* Add shared library scripted test
* Add compile time checks and tests
* Sync Scala 3 compiler plugin with Scala 2
* Generate dllexport modifiers for exported symbols on Windows
* Generate gxx personality for externs
* Restrict generation of dllexport only to Sig.Extern names
* Check if new compilation flags fix exception on mac
* Add mixxing isMac method in scirpted Platform
* Generate dylib constructor to init ScalaNative
* Set lib prefix for library outputs
* Allow to produce static libraries
* Build static library using llvm-ar directly
* Don't allow to generate '.ll' file with empty basename
* Upgrade al-cheb/configure-pagefile-action to remove CI warnings
Co-authored-by: adampauls <adpauls@microsoft.com>

(cherry picked from commit a4df2de)

* Add JDK9 constructors to `j.m.BigInteger` (#2974)

* Add JDK9 ctors to `j.m.BigInteger`
* Port ctor tests from Scala.js
* Add JDK9 tests
* Add error checking

(cherry picked from commit 1a3981d)

* Remove last two Scala 3.2 build warnings (#2977)

(cherry picked from commit 38cef3e)

* Implement `java.lang.Math.fma` (#2979)

* Fix JDK compliance CI tests

Co-authored-by: Eric K Richardson <ekrichardson@gmail.com>
Co-authored-by: Jamie Willis <J_mie@hotmail.co.uk>
Co-authored-by: Mark Hammons <markehammons@gmail.com>
Co-authored-by: LeeTibbert <LeeTibbert@users.noreply.github.com>
Co-authored-by: Arman Bilge <armanbilge@gmail.com>
Co-authored-by: David Bouyssié <6719996+david-bouyssie@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport candidate PR which might be backported into previous major release of SN component:gc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clang 15.0.3 fails build because of missing prototype in Commix.
3 participants