hanzz2007 commented on issue #6093:
URL: https://github.com/apache/incubator-tvm/issues/6093#issuecomment-661696506
I know it's intended when we want to initialize AttrsNode with arguments,
but what if initialize with default value, `if (ffind_(key, &val))` will
always return `false`, so `opt.value_missing_` must be `true` in
`AttrInitEntry<T> operator()(const char* key, T* value) `,
and when return from `AttrInitEntry<T> operator()`, `opt` will be
destructed so exception throwed.
`opt.value_missing_` is set to `false` when `... constant
loop").set_default(false);` executed, but it's too late, because `opt`
constructed in `AttrInitEntry<T> operator()` has been called destructor
function when function finish.
In gcc and llvm, no exception throwed for `opt.~AttrInitEntry()` will not
be called because RVO optimization I guess. But it should be a problem in
standard way.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]