D11811: avoid Asan runtime error: shift exponent -1 is negative
This revision was automatically updated to reflect the committed changes. Closed by commit R39:3e8bbe0ad838: avoid Asan runtime error: shift exponent -1 is negative (authored by jtamate). REPOSITORY R39 KTextEditor CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D11811?vs=31271=31312 REVISION DETAIL https://phabricator.kde.org/D11811 AFFECTED FILES src/completion/katecompletionconfig.cpp To: jtamate, #kate, #frameworks, mwolff Cc: mwolff, brauch, michaelh, kevinapavew, ngraham, demsking, cullmann, sars, dhaumann
D11811: avoid Asan runtime error: shift exponent -1 is negative
mwolff accepted this revision. mwolff added a comment. This revision is now accepted and ready to land. thanks REPOSITORY R39 KTextEditor REVISION DETAIL https://phabricator.kde.org/D11811 To: jtamate, #kate, #frameworks, mwolff Cc: mwolff, brauch, michaelh, kevinapavew, ngraham, demsking, cullmann, sars, dhaumann
D11811: avoid Asan runtime error: shift exponent -1 is negative
jtamate updated this revision to Diff 31271. jtamate added a comment. Implemented mwolf solution. REPOSITORY R39 KTextEditor CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D11811?vs=30952=31271 REVISION DETAIL https://phabricator.kde.org/D11811 AFFECTED FILES src/completion/katecompletionconfig.cpp To: jtamate, #kate, #frameworks Cc: mwolff, brauch, michaelh, kevinapavew, ngraham, demsking, cullmann, sars, dhaumann
D11811: avoid Asan runtime error: shift exponent -1 is negative
mwolff added a comment. maybe instead make it explicit what the old code did instead? i.e. check what you get from GCC for "1 << -1" and then use that when i == 0 REPOSITORY R39 KTextEditor REVISION DETAIL https://phabricator.kde.org/D11811 To: jtamate, #kate, #frameworks Cc: mwolff, brauch, michaelh, kevinapavew, ngraham, demsking, cullmann, sars, dhaumann
D11811: avoid Asan runtime error: shift exponent -1 is negative
brauch added a comment. Change looks good (the previous code definitely looks like nonsense), but what does this mean for existing settings, saved previously? REPOSITORY R39 KTextEditor REVISION DETAIL https://phabricator.kde.org/D11811 To: jtamate, #kate, #frameworks Cc: brauch, michaelh, kevinapavew, ngraham, demsking, cullmann, sars, dhaumann
D11811: avoid Asan runtime error: shift exponent -1 is negative
jtamate created this revision. jtamate added reviewers: Kate, Frameworks. Restricted Application added projects: Kate, Frameworks. jtamate requested review of this revision. REVISION SUMMARY Avoid doing a 1<<-1. TEST PLAN Before: frameworks/ktexteditor/src/completion/katecompletionconfig.cpp:195:33: runtime error: shift exponent -1 is negative after: silence REPOSITORY R39 KTextEditor REVISION DETAIL https://phabricator.kde.org/D11811 AFFECTED FILES src/completion/katecompletionconfig.cpp To: jtamate, #kate, #frameworks Cc: michaelh, kevinapavew, ngraham, demsking, cullmann, sars, dhaumann