Skip to content

Abort on std::logic_error in debug builds#12522

Merged
akuzm merged 4 commits intomasterfrom
aku/std-logic-error
Jul 20, 2020
Merged

Abort on std::logic_error in debug builds#12522
akuzm merged 4 commits intomasterfrom
aku/std-logic-error

Conversation

@akuzm
Copy link
Copy Markdown
Contributor

@akuzm akuzm commented Jul 15, 2020

This helps notice them in tests, same as assert() and LOGICAL_ERROR.

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

This helps notice them in tests, same as assert() and LOGICAL_ERROR.
@robot-clickhouse robot-clickhouse added the pr-not-for-changelog This PR should not be mentioned in the changelog label Jul 15, 2020
// Server should die on std logic errors in debug, like with assert()
// or ErrorCodes::LOGICAL_ERROR. This helps catch these errors in
// tests.
assert(false);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

std::terminate?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I only want it in a debug build, so assert is more convenient.

@nikitamikhaylov nikitamikhaylov self-assigned this Jul 15, 2020
@akuzm
Copy link
Copy Markdown
Contributor Author

akuzm commented Jul 16, 2020

SELECT toRelativeDayNum(( SELECT dictGetUInt8() ) AS a), NULL, ( SELECT * FROM hdfs(['B:q']) ) AS st, []; 

sql_fuzzy.pl finds an assertion right away

@akuzm
Copy link
Copy Markdown
Contributor Author

akuzm commented Jul 17, 2020

https://clickhouse-test-reports.s3.yandex.net/12522/a4a23673cc640ab77efc9315a919519a9e49ed89/functional_stateless_tests_(debug)/test_run.txt.out.log

Logical error: 'Sort order of blocks violated for column ``, left: UInt64_255, right: UInt64_0.'.

Looks like it's not related to the changes.

@akuzm akuzm merged commit 232cd26 into master Jul 20, 2020
@akuzm akuzm deleted the aku/std-logic-error branch July 20, 2020 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-not-for-changelog This PR should not be mentioned in the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants