Skip to content

Conversation

ShortDevelopment
Copy link
Contributor

@ShortDevelopment ShortDevelopment commented Oct 7, 2025

CC uses the Microsoft source-code annotation language (SAL) to enable static analysis of pointer usage etc.

The CC code-base still uses the old annotations (e.g. __in instead of _In_).
Some of the old SAL annotation (i.e. __in) stand in conflict with the stdlib.

Here's an inofficial guide: https://samscode.blogspot.com/2015/02/sal-to-sal2-porting-guide.html

Changes


@rhuanjl

@rhuanjl
Copy link
Collaborator

rhuanjl commented Oct 8, 2025

Good to see this clean up.

I don't like all the warning removals the project already has rather than increasing them can we change the code?
Is the memset with non-void* essential? Could we get rid of the warning by casting the relevant pointer(s)?

@ShortDevelopment
Copy link
Contributor Author

@rhuanjl Sure. The compiler now enforces an explicit void* cast for memset etc.
I can fix that later today.

libtype_flag: ''
Ubuntu20.ReleaseWithDebug:
image_name: 'ubuntu-20.04'
Ubuntu24.ReleaseWithDebug:
Copy link
Collaborator

@rhuanjl rhuanjl Oct 8, 2025

Choose a reason for hiding this comment

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

The 4 Linux tests above were meant to be latest ubuntu then these two below were meant to be an older version for slightly broader coverage.

To keep the pattern should put the top 4 to Ubuntu24 and change these two to Ubuntu 22.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point!
Done in 88fc061 (I removed the old commit through rebase)

@rhuanjl
Copy link
Collaborator

rhuanjl commented Oct 8, 2025

Happy with everything other than the CI change (see comment above).

first argument in call to 'memset' is a pointer to non-trivially copyable type [-Wnontrivial-memcall]
@rhuanjl rhuanjl merged commit c6a9549 into chakra-core:master Oct 9, 2025
24 checks passed
@ShortDevelopment ShortDevelopment deleted the refactor/sal-2 branch October 9, 2025 11:30
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