Closed rrrooommmaaa closed 4 years ago
Strictly speaking, it is incorrect to call obj = (struct rnp_identifier_iterator_st *) calloc(1, sizeof(*obj));
on rnp_identifier_iterator_st, which has C++ field. (yeah, I know, that's code written by me :) ).
Also it is wrong to call free
later on it.
While this worked with other compilers, maybe MSVC does things in a bit different way.
Maybe changing field keyp
type to std::list<pgp_key_t>::iterator *
with all the corresponding adjustments may help.
Unfortunately I don't have environment with MSVC right now, so cannot check this.
Description
The line
keyring->keys.clear();
sometimes triggers runtime exception in MSVC. Perhaps, some iterator is referencing a deleted object (incorrect order of destruction). Does anyone have an idea where we could possibly have made a mess with iterators etc.?Steps to Reproduce
run
test_ffi_key_iter
test