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

build: Fix check of __builtin functions #247

Draft
wants to merge 148 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
148 commits
Select commit Hold shift + click to select a range
1a6be57
bench: Make benchmarks compile on MSVC
real-or-random Mar 9, 2022
cca8cbb
configure: Output message when checking for valgrind
real-or-random Mar 9, 2022
1cc0941
configure: Don't abort if the compiler does not define __STDC__
real-or-random Mar 9, 2022
3b4f3d0
build: Reject C++ compilers in the preprocessor
real-or-random Mar 17, 2022
09f3d71
configure: Add a few CFLAGS for MSVC
real-or-random Mar 9, 2022
2f984ff
Save negations in var-time group addition
peterdettman Dec 26, 2021
7efc983
Fix the false positive of `SECP_64BIT_ASM_CHECK`
SpriteOvO Apr 15, 2022
8b013fc
Merge bitcoin-core/secp256k1#1056: Save negations in var-time group a…
real-or-random Apr 16, 2022
485f608
Merge bitcoin-core/secp256k1#1104: Fix the false positive of `SECP_64…
real-or-random Apr 16, 2022
6f6cab9
abi: Don't export symbols in static Windows libraries
theuni May 4, 2022
44c2452
Merge bitcoin-core/secp256k1#1105: Don't export symbols in static lib…
real-or-random May 19, 2022
bd81f41
schnorrsig bench: Suppress a stupid warning in MSVC
real-or-random Mar 9, 2022
2be6ba0
configure: Convince autotools to work with MSVC's archiver lib.exe
real-or-random Mar 14, 2022
9efc2e5
ci: Add MSVC builds
real-or-random Mar 10, 2022
3fb3269
ci: Add 32-bit MinGW64 build
real-or-random Mar 15, 2022
51f296a
ci: Run persistent wineserver to speed up wine
real-or-random Mar 16, 2022
8dc4b03
ci: Add a C++ job that compiles the public headers without -fpermissive
real-or-random Mar 17, 2022
49e2acd
configure: Improve rationale for WERROR_CFLAGS
real-or-random Jun 29, 2022
1827c9b
scratch_destroy: move VERIFY_CHECK after invalid scrach space check
siv2r Jun 29, 2022
cd47033
Merge bitcoin-core/secp256k1#1084: ci: Add MSVC builds
jonasnick Jun 29, 2022
accadc9
Merge bitcoin-core/secp256k1#1114: `_scratch_destroy`: move `VERIFY_C…
jonasnick Jun 29, 2022
069aba8
Fix sepc256k1 -> secp256k1 typo in group.h
henopied Jun 30, 2022
43756da
Merge bitcoin-core/secp256k1#1115: Fix sepc256k1 -> secp256k1 typo in…
real-or-random Jun 30, 2022
40a3473
build: Fix #include "..." paths to get rid of further -I arguments
real-or-random Jun 30, 2022
af65d30
Merge bitcoin-core/secp256k1#1116: build: Fix #include "..." paths to…
real-or-random Jul 1, 2022
4cc0b1b
ecmult_gen: Skip RNG when creating blinding if no seed is available
real-or-random Jul 5, 2022
7a86955
ecmult_gen: Simplify code (no observable change)
real-or-random Jul 5, 2022
55f8bc9
ecmult_gen: Improve comments about projective blinding
real-or-random Jul 5, 2022
d0cf55e
config: Set preprocessor defaults for ECMULT_* config values
real-or-random Jul 6, 2022
63a3565
Merge bitcoin-core/secp256k1#1120: ecmult_gen: Skip RNG when creating…
real-or-random Jul 7, 2022
da6514a
config: Introduce DEBUG_CONFIG macro for debug output of config
real-or-random Jul 6, 2022
c27ae45
config: Remove basic-config.h
real-or-random Jul 6, 2022
17065f4
tests: Randomize the context with probability 15/16 instead of 1/4
real-or-random Jul 7, 2022
6a873cc
Merge bitcoin-core/secp256k1#1122: tests: Randomize the context with …
jonasnick Jul 11, 2022
3efeb9d
Merge bitcoin-core/secp256k1#1121: config: Set preprocessor defaults …
jonasnick Jul 11, 2022
cabe085
configure: Remove pkgconfig macros again (reintroduced by mismerge)
real-or-random Jul 21, 2022
9f8a13d
Merge bitcoin-core/secp256k1#1128: configure: Remove pkgconfig macros…
real-or-random Jul 21, 2022
ef48f08
readme: Add IRC channel
real-or-random Aug 2, 2022
78f5296
readme: Sell "no runtime dependencies"
real-or-random Aug 2, 2022
88b0089
readme: Fix line break
real-or-random Aug 2, 2022
694ce8f
Merge bitcoin-core/secp256k1#1131: readme: Misc improvements
real-or-random Aug 2, 2022
41e8704
build: Enable some modules by default
real-or-random Oct 19, 2021
798727a
Revert "Add test logs to gitignore"
hebasto Oct 28, 2022
f5039cb
Cleanup `.gitignore` file
hebasto Oct 28, 2022
a43e982
Merge bitcoin-core/secp256k1#1144: Cleanup `.gitignore` file
jonasnick Nov 1, 2022
4e54c03
ci: print env to allow reproducing the job outside of CI
jonasnick Nov 2, 2022
49ae843
ci: mostly prevent "-v/--version: not found" irrelevant error
jonasnick Nov 2, 2022
5c9f1a5
ci: always cat all logs_snippets
jonasnick Nov 7, 2022
6a965b6
Remove usage of CHECK from non-test file
tcharding Nov 4, 2022
2914bcc
Simulated int128 type.
roconnor-blockstream Jul 27, 2022
dceaa1f
int128: Tidy #includes of int128.h and int128_impl.h
real-or-random Feb 1, 2022
a340d95
ci: add int128_struct tests
jonasnick Nov 2, 2022
e13fae4
Merge bitcoin-core/secp256k1#1150: ci: always cat test_env.log
jonasnick Nov 8, 2022
c2ee917
Merge bitcoin-core/secp256k1#1146: ci: prevent "-v/--version: not fou…
jonasnick Nov 8, 2022
44916ae
Merge bitcoin-core/secp256k1#1147: ci: print env to allow reproducing…
real-or-random Nov 14, 2022
00a42b9
Add MSan CI job
sipa Nov 16, 2022
86e3b38
Merge bitcoin-core/secp256k1#1149: Remove usage of CHECK from non-tes…
real-or-random Nov 16, 2022
ddf2b29
Merge bitcoin-core/secp256k1#1000: Synthetic int128 type.
real-or-random Nov 16, 2022
6138d73
Merge bitcoin-core/secp256k1#1155: Add MSan CI jobs
jonasnick Nov 17, 2022
f2b7e88
Add int128 randomized tests
sipa Nov 14, 2022
63ff064
int128: Add test override for testing __(u)mulh on MSVC X64
real-or-random Nov 14, 2022
9b5f589
Heuristically decide whether to use int128_struct
sipa Nov 16, 2022
c0ae48c
Update macOS image for CI
sipa Nov 14, 2022
3afce0a
Avoid signed overflow in MSVC AMR64 secp256k1_mul128
sipa Nov 17, 2022
a8494b0
Use compute credits for macOS jobs
sipa Nov 15, 2022
99bd335
Make int128 overflow test use secp256k1_[ui]128_mul
sipa Nov 17, 2022
e40fd27
Merge bitcoin-core/secp256k1#1156: Followups to int128_struct arithmetic
real-or-random Nov 18, 2022
4bc4290
Add a secp256k1_i128_to_u64 function.
roconnor-blockstream Oct 25, 2022
d216475
test secp256k1_i128_to_i64
roconnor-blockstream Nov 21, 2022
2286f80
Merge bitcoin-core/secp256k1#993: Enable non-experimental modules by …
real-or-random Nov 22, 2022
751c435
Merge bitcoin-core/secp256k1#1152: Update macOS image for CI
jonasnick Nov 24, 2022
ee7341f
docs: Never require a verification context
real-or-random Jul 5, 2022
1a553ee
docs: Change signature "validation" to "verification"
real-or-random Jul 5, 2022
092be61
gitignore: Add *.sage.py files autogenerated by sage
real-or-random Dec 1, 2022
477f02c
Merge bitcoin-core/secp256k1#1165: gitignore: Add *.sage.py files aut…
jonasnick Dec 1, 2022
316ac76
contexts: Deprecate all context flags except SECP256K1_CONTEXT_NONE
real-or-random Jul 6, 2022
72fedf8
docs: Improve docs for static context
real-or-random Dec 5, 2022
53796d2
contexts: Rename static context
real-or-random Jul 6, 2022
d2c6d48
tests: Use new name of static context
real-or-random Jul 18, 2022
e383fbf
selftest: Rename internal function to make name available for API
real-or-random Jul 6, 2022
e02d686
selftest: Expose in public API
real-or-random Jul 15, 2022
0612636
docs: Tidy and improve docs about contexts and randomization
real-or-random Dec 5, 2022
e7d0185
docs: Get rid of "initialized for signing" terminology
real-or-random Nov 25, 2022
7289b51
docs: Use doxygen style if and only if comment is user-facing
real-or-random Nov 23, 2022
4386a23
examples: Switch to NONE contexts
real-or-random Nov 25, 2022
e3f8477
Merge bitcoin-core/secp256k1#1126: API cleanup with respect to contexts
jonasnick Dec 6, 2022
90618e9
doc: move CHANGELOG from doc/ to root directory
jonasnick Dec 6, 2022
8d7a9a8
benchmarks: Switch to NONE contexts
jonasnick Nov 28, 2022
37ba744
tests: Switch to NONE contexts in exhaustive and ctime tests
jonasnick Nov 28, 2022
caa0ad6
group: add gej_eq_var
jonasnick Dec 5, 2022
86540e9
tests: add test for deprecated flags and rm them from run_context
jonasnick Nov 28, 2022
0c8a5ca
tests: Switch to NONE contexts in tests.c
jonasnick Nov 28, 2022
d6dc0f4
tests: Switch to NONE contexts in module tests
jonasnick Nov 28, 2022
5c789dc
Merge bitcoin-core/secp256k1#1168: Replace deprecated context flags w…
real-or-random Dec 7, 2022
ad39e2d
build: change package version to 0.1.0-dev
jonasnick Dec 6, 2022
cf66f23
refactor: Add helper function secp256k1_context_is_proper()
real-or-random Dec 5, 2022
c635c1b
Change ARG_CHECK_NO_RETURN to ARG_CHECK_VOID which returns (void)
real-or-random Dec 7, 2022
2551cda
tests: Fix code formatting
real-or-random Dec 7, 2022
a49e094
docs: Fix typo
real-or-random Dec 8, 2022
7e5b226
Don't use compute credits for now
sipa Dec 12, 2022
b1f992a
doc: improve release process
jonasnick Dec 23, 2021
13bf1b6
changelog: make order of change types match keepachangelog.com
jonasnick Dec 12, 2022
8c949f5
Merge bitcoin-core/secp256k1#1173: Don't use compute credits for now
jonasnick Dec 12, 2022
6d1784a
build: add missing files to EXTRA_DIST
jonasnick Dec 12, 2022
e025ccd
release: prepare for initial release 0.2.0
jonasnick Dec 23, 2021
21ffe4b
Merge bitcoin-core/secp256k1#1055: Prepare initial release
sipa Dec 12, 2022
b6b360e
doc: improve message of cleanup commit
jonasnick Dec 12, 2022
02ebc29
release cleanup: bump version after 0.2.0
jonasnick Dec 12, 2022
9a8d65f
Merge bitcoin-core/secp256k1#1174: release cleanup: bump version afte…
jonasnick Dec 12, 2022
cee8223
Mention semantic versioning in changelog
sipa Dec 13, 2022
ac233e1
Add links to diffs to changelog
sipa Dec 13, 2022
2dc133a
Add more changelog entries
sipa Dec 13, 2022
9ecf814
Reduce font size in changelog
sipa Dec 13, 2022
b627ba7
Remove dependency on `src/libsecp256k1-config.h`
hebasto Dec 15, 2022
ad8647f
Drop no longer relevant files from `.gitignore`
hebasto Dec 15, 2022
9c5a4d2
Do not define unused `HAVE_VALGRIND` macro
hebasto Dec 15, 2022
c2e0fda
ci: set -u in cirrus.sh to treat unset variables as an error
jonasnick Nov 8, 2022
7a74688
ci: add missing CFLAGS & CPPFLAGS variable to print_environment
jonasnick Nov 17, 2022
75d7b7f
Merge bitcoin-core/secp256k1#1154: ci: set -u in cirrus.sh to treat u…
real-or-random Dec 19, 2022
665ba77
Merge bitcoin-core/secp256k1#1178: Drop `src/libsecp256k1-config.h`
sipa Dec 20, 2022
881fc33
Consistency in naming of modules
sipa Dec 20, 2022
c30b889
Clarify that the ABI-incompatible versions are earlier
sipa Dec 20, 2022
3f57b9f
Merge bitcoin-core/secp256k1#1177: Some improvements to the changelog
jonasnick Dec 20, 2022
eacad90
Merge bitcoin-core/secp256k1#1171: Change ARG_CHECK_NO_RETURN to ARG_…
jonasnick Dec 21, 2022
01b819a
Merge bitcoin-core/secp256k1#1158: Add a secp256k1_i128_to_u64 function.
real-or-random Dec 21, 2022
c0a555b
Bugfix: pass SECP_CONFIG_DEFINES to bench compilation
sipa Dec 29, 2022
31ed538
Merge bitcoin-core/secp256k1#1183: Bugfix: pass SECP_CONFIG_DEFINES t…
real-or-random Jan 2, 2023
2f9ca28
Drop `SECP_CONFIG_DEFINES` from examples
hebasto Jan 3, 2023
2a39ac1
Merge bitcoin-core/secp256k1#1185: Drop `SECP_CONFIG_DEFINES` from ex…
real-or-random Jan 3, 2023
b198061
tests: Use global copy of secp256k1_context_static instead of clone
real-or-random Dec 7, 2022
18e0db3
tests: Don't recreate global context in scratch space test
real-or-random Jan 4, 2023
ce4f936
tests: Tidy run_context_tests() by extracting functions
real-or-random Dec 7, 2022
f32a36f
tests: Don't use global context for context tests
real-or-random Dec 7, 2022
fc90bb5
refactor: Tidy up main()
real-or-random Jan 4, 2023
a4a0937
tests: Clean up and improve run_context_tests() further
real-or-random Jan 4, 2023
39e8f0e
refactor: Separate run_context_tests into static vs proper contexts
real-or-random Jan 4, 2023
0eb3000
Merge bitcoin-core/secp256k1#1186: tests: Tidy context tests
real-or-random Jan 6, 2023
2037600
tests: Add noverify_tests which is like tests but without VERIFY
real-or-random Jan 5, 2023
cbe41ac
Merge bitcoin-core/secp256k1#1188: tests: Add noverify_tests which is…
sipa Jan 9, 2023
3385a26
refactor: Rename global variables to uppercase in tests
real-or-random Jan 5, 2023
9a93f48
refactor: Rename STTC to STATIC_CTX in tests
real-or-random Jan 5, 2023
cc3b8a4
Merge bitcoin-core/secp256k1#1187: refactor: Rename global variables …
real-or-random Jan 11, 2023
9a98106
Merge commits '8b013fce 485f608f 44c2452f cd470333 accadc94 43756da8 …
jonasnick Jul 17, 2023
64717a7
Merge commits '8b013fce 485f608f 44c2452f cd470333 accadc94 43756da8 …
jonasnick Jul 17, 2023
e996d07
Merge commits '44916ae9 86e3b38a ddf2b291 6138d73b e40fd277 ' into te…
jonasnick Jul 17, 2023
6c54db1
Merge commits '2286f809 751c4354 477f02c4 e3f84777 5c789dcd 8c949f56 …
jonasnick Jul 18, 2023
304fc88
Merge commits '9a8d65f0 75d7b7f5 665ba77e 3f57b9f7 eacad90f 01b819a8 …
jonasnick Jul 19, 2023
9647687
build: Fix check of __builtin functions
real-or-random Jul 20, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
docs: Use doxygen style if and only if comment is user-facing
and improve phrasing slightly.
real-or-random committed Dec 5, 2022
commit 7289b51d31bf091330f1bcae397fba8b2b2d54ab
16 changes: 8 additions & 8 deletions include/secp256k1.h
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ extern "C" {

#include <stddef.h>

/* Unless explicitly stated all pointer arguments must not be NULL.
/** Unless explicitly stated all pointer arguments must not be NULL.
*
* The following rules specify the order of arguments in API calls:
*
@@ -134,7 +134,7 @@ typedef int (*secp256k1_nonce_function)(
# define SECP256K1_INLINE inline
# endif

/** When this header is used at build-time the SECP256K1_BUILD define needs to be set
/* When this header is used at build-time the SECP256K1_BUILD define needs to be set
* to correctly setup export attributes and nullness checks. This is normally done
* by secp256k1.c but to guard against this header being included before secp256k1.c
* has had a chance to set the define (e.g. via test harnesses that just includes
@@ -163,9 +163,9 @@ typedef int (*secp256k1_nonce_function)(
# endif
#endif

/**Warning attributes
* NONNULL is not used if SECP256K1_BUILD is set to avoid the compiler optimizing out
* some paranoid null checks. */
/* Warning attributes
* NONNULL is not used if SECP256K1_BUILD is set to avoid the compiler optimizing out
* some paranoid null checks. */
# if defined(__GNUC__) && SECP256K1_GNUC_PREREQ(3, 4)
# define SECP256K1_WARN_UNUSED_RESULT __attribute__ ((__warn_unused_result__))
# else
@@ -177,7 +177,7 @@ typedef int (*secp256k1_nonce_function)(
# define SECP256K1_ARG_NONNULL(_x)
# endif

/** Attribute for marking functions, types, and variables as deprecated */
/* Attribute for marking functions, types, and variables as deprecated */
#if !defined(SECP256K1_BUILD) && defined(__has_attribute)
# if __has_attribute(__deprecated__)
# define SECP256K1_DEPRECATED(_msg) __attribute__ ((__deprecated__(_msg)))
@@ -188,11 +188,11 @@ typedef int (*secp256k1_nonce_function)(
# define SECP256K1_DEPRECATED(_msg)
#endif

/** All flags' lower 8 bits indicate what they're for. Do not use directly. */
/* All flags' lower 8 bits indicate what they're for. Do not use directly. */
#define SECP256K1_FLAGS_TYPE_MASK ((1 << 8) - 1)
#define SECP256K1_FLAGS_TYPE_CONTEXT (1 << 0)
#define SECP256K1_FLAGS_TYPE_COMPRESSION (1 << 1)
/** The higher bits contain the actual data. Do not use directly. */
/* The higher bits contain the actual data. Do not use directly. */
#define SECP256K1_FLAGS_BIT_CONTEXT_VERIFY (1 << 8)
#define SECP256K1_FLAGS_BIT_CONTEXT_SIGN (1 << 9)
#define SECP256K1_FLAGS_BIT_CONTEXT_DECLASSIFY (1 << 10)