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 bug in TokenStream parser #2905

Merged
merged 1 commit into from
Sep 13, 2024
Merged

Conversation

learn-more
Copy link
Contributor

When presented with just '-' it would access the string at position [1]

I discovered this while mistyping the '-?' option, which triggered an assert in my test binary.

When presented with just '-' it would access the string at position [1]
Copy link

codecov bot commented Sep 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.95%. Comparing base (fa306fc) to head (ea85f83).
Report is 3 commits behind head on devel.

Additional details and impacted files
@@            Coverage Diff             @@
##            devel    #2905      +/-   ##
==========================================
+ Coverage   90.90%   90.95%   +0.05%     
==========================================
  Files         199      199              
  Lines        8595     8598       +3     
==========================================
+ Hits         7813     7820       +7     
+ Misses        782      778       -4     

@horenmar horenmar merged commit 02d3304 into catchorg:devel Sep 13, 2024
77 checks passed
@learn-more learn-more deleted the clara_tokenstream branch September 13, 2024 17:48
GerHobbelt added a commit to GerHobbelt/Catch2 that referenced this pull request Sep 27, 2024
v3.7.1

=== Improvements ===
* Applied the JUnit reporter's optimization from last release to the SonarQube reporter
* Suppressed `-Wuseless-cast` in `CHECK_THROWS_MATCHES` (catchorg#2904)
* Standardize exit codes for various failures
  * Running no tests is now guaranteed to exit with 2 (without the `--allow-running-no-tests` flag)
  * All tests skipped is now always 4 (...)
  * Assertion failures are now always 42
  * and so on

=== Fixes ===
* Fixed out-of-bounds access when the arg parser encounters single `-` as an argument (catchorg#2905)

=== Miscellaneous ===
* Added `catch_config_prefix_messages.hpp` to meson build (catchorg#2903)
* `catch_discover_tests` now supports skipped tests (catchorg#2873)
  * You can get the old behaviour by calling `catch_discover_tests` with `SKIP_IS_FAILURE` option.

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCgAdFiEE8QyLZSqAHw/oZQgX3kgwe4sNOBoFAmbpQnMACgkQ3kgwe4sN
# OBpa1Q//UbNsxKpLU7cKzCr3kEOOc2RsryS5foHYRs+mhUzOFYf4y1HkSdvzc3TV
# ZUI8sA5FA1OVO7JtCSpgzizF5vGiOunDFGgroSw9kIxsX0KtHugksNgQcU7QeFEf
# 6KqtKb4/tmRryuyoHZTdWMxBGpB4dtc3zy1Yq+ebe8k52neBmilb80Mz9KbuQ4vT
# QAXz7xWiZukHyxosmKZe5kxDLF3Ck5iVCvvUJu9iwiE6Ua8TIJgs+sOFApsQztmu
# 5hwrmajqZGLB65RQe4G6AXScNLGnzRTJwByR5fg+YFZQmUdjSE0oQ6rd2Ni9qk5c
# QUOPBAVA2A3rahnV3k9bY6SapFjeTZlO4/go9eSzswc2CU7LCX0jRME5d+oW6YJ4
# H0XgacVYM362Exd4hKsSplfuvwkRi1irlnGxHpTvBLBp1czJgUnQV1lwsncaiQFx
# IZfxiqot+V0fPEweVkgHOwf175o9SLLZka6546MFgSvWY8yEEMnl3nLrmeHhCFPq
# 70MdKcj/Qbzkzd5PTSuUoUhxIFZJMzsszj9b0pdGlCb5ObRMcN0UHKG9nVNXWTmn
# tWnukCdzGHsZzaHjH/J0IY8P9ANNjAb5xtROzuF5TmE6h+D5J6kwxGTqZoCyqmC/
# FyPPf1WYkrU2qj+ms7SbdyGlE7s1w8VF/7p3/EKwoE2fpZk/9WM=
# =lDEO
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue Sep 17 10:48:51 2024 WEDT
# gpg:                using RSA key F10C8B652A801F0FE8650817DE48307B8B0D381A
# gpg: Can't check signature: No public key

# Conflicts:
#	README.md
#	conanfile.py
#	docs/release-notes.md
#	docs/tutorial.md
#	include/internal/catch_compiler_capabilities.h
#	include/internal/catch_debugger.h
#	include/internal/catch_evaluate.hpp
#	include/internal/catch_expression_lhs.hpp
#	include/internal/catch_fatal_condition.hpp
#	include/internal/catch_message.hpp
#	include/internal/catch_result_builder.hpp
#	include/internal/catch_run_context.hpp
#	include/internal/catch_test_case_registry_impl.hpp
#	include/reporters/catch_reporter_console.hpp
#	include/reporters/catch_reporter_teamcity.hpp
#	include/reporters/catch_reporter_xml.hpp
#	scripts/updateVcpkgPackage.py
#	single_include/catch.hpp
#	src/catch2/catch_version.cpp
#	test_package/conanfile.py
GlynLeine added a commit to Rythe-Interactive/Catch2 that referenced this pull request Oct 15, 2024
v3.7.1

=== Improvements ===
* Applied the JUnit reporter's optimization from last release to the SonarQube reporter
* Suppressed `-Wuseless-cast` in `CHECK_THROWS_MATCHES` (catchorg#2904)
* Standardize exit codes for various failures
  * Running no tests is now guaranteed to exit with 2 (without the `--allow-running-no-tests` flag)
  * All tests skipped is now always 4 (...)
  * Assertion failures are now always 42
  * and so on

=== Fixes ===
* Fixed out-of-bounds access when the arg parser encounters single `-` as an argument (catchorg#2905)

=== Miscellaneous ===
* Added `catch_config_prefix_messages.hpp` to meson build (catchorg#2903)
* `catch_discover_tests` now supports skipped tests (catchorg#2873)
  * You can get the old behaviour by calling `catch_discover_tests` with `SKIP_IS_FAILURE` option.

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCgAdFiEE8QyLZSqAHw/oZQgX3kgwe4sNOBoFAmbpQnMACgkQ3kgwe4sN
# OBpa1Q//UbNsxKpLU7cKzCr3kEOOc2RsryS5foHYRs+mhUzOFYf4y1HkSdvzc3TV
# ZUI8sA5FA1OVO7JtCSpgzizF5vGiOunDFGgroSw9kIxsX0KtHugksNgQcU7QeFEf
# 6KqtKb4/tmRryuyoHZTdWMxBGpB4dtc3zy1Yq+ebe8k52neBmilb80Mz9KbuQ4vT
# QAXz7xWiZukHyxosmKZe5kxDLF3Ck5iVCvvUJu9iwiE6Ua8TIJgs+sOFApsQztmu
# 5hwrmajqZGLB65RQe4G6AXScNLGnzRTJwByR5fg+YFZQmUdjSE0oQ6rd2Ni9qk5c
# QUOPBAVA2A3rahnV3k9bY6SapFjeTZlO4/go9eSzswc2CU7LCX0jRME5d+oW6YJ4
# H0XgacVYM362Exd4hKsSplfuvwkRi1irlnGxHpTvBLBp1czJgUnQV1lwsncaiQFx
# IZfxiqot+V0fPEweVkgHOwf175o9SLLZka6546MFgSvWY8yEEMnl3nLrmeHhCFPq
# 70MdKcj/Qbzkzd5PTSuUoUhxIFZJMzsszj9b0pdGlCb5ObRMcN0UHKG9nVNXWTmn
# tWnukCdzGHsZzaHjH/J0IY8P9ANNjAb5xtROzuF5TmE6h+D5J6kwxGTqZoCyqmC/
# FyPPf1WYkrU2qj+ms7SbdyGlE7s1w8VF/7p3/EKwoE2fpZk/9WM=
# =lDEO
# -----END PGP SIGNATURE-----
# gpg: directory '/c/Users/Ty Rymer/.gnupg' created
# gpg: Signature made Tue Sep 17 10:48:51 2024 WEST
# gpg:                using RSA key F10C8B652A801F0FE8650817DE48307B8B0D381A
# gpg: Can't check signature: No public key
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants