Conversation
Notices
-
あじょぶじん@ご隠居管理 (azyobuzin@xxx.azyobuzi.net)'s status on Thursday, 23-Dec-2021 02:20:00 JST あじょぶじん@ご隠居管理
throw std::logic_error(what_arg); 、 what_arg に渡した string はいつ解放されるの?になって気になって眠れなくなってしまった - らりお・ザ・何らかの🈗然㊌ソムリエ repeated this.
-
あじょぶじん@ご隠居管理 (azyobuzin@xxx.azyobuzi.net)'s status on Thursday, 23-Dec-2021 02:20:00 JST あじょぶじん@ご隠居管理
そもそもこの引数 const string& なので、動的に作った string を渡してはいけない? じゃあ vector.at の例外はどうやって作ってるんだ? らりお・ザ・何らかの🈗然㊌ソムリエ repeated this. -
あじょぶじん@ご隠居管理 (azyobuzin@xxx.azyobuzi.net)'s status on Thursday, 23-Dec-2021 02:27:49 JST あじょぶじん@ご隠居管理
これを見る限り catch したら use after free じゃないですか? https://github.com/microsoft/STL/blob/303df3dae6f5ed9fe4f1c35257f663af8355584a/stl/inc/stdexcept#L25 らりお・ザ・何らかの🈗然㊌ソムリエ repeated this. -
あじょぶじん@ご隠居管理 (azyobuzin@xxx.azyobuzi.net)'s status on Thursday, 23-Dec-2021 02:27:49 JST あじょぶじん@ご隠居管理
rvalue な string を渡すの、みんなやっとるな。これ合法? それとも運よく動いてるだけなのか? https://stackoverflow.com/questions/12261915/how-to-throw-stdexceptions-with-variable-messages In conversation permalink Attachments