Ticket #1207 (closed defect: fixed)
bug with shared changes and conversion path cached
| Reported by: | prahal | Owned by: | dgollub |
|---|---|---|---|
| Priority: | high | Milestone: | OpenSync 0.40 |
| Component: | OpenSync | Version: | 0.39 |
| Severity: | critical | Keywords: | |
| Cc: |
Description
There is a segfault if a change that is not the first on a member that is not the first and if the memebr have different objformat for the same sink. This in PREPARE_WRITE. Ie the first member to prepare write the change will convert it to its sink format (here vcard21 for my phone). Then the second member (evolution) will try have a cached conversion path (as the change is not the first) of xmlformat-contact to vcard21. Thus when preparing the change that has already been converted by the phone member as vard21 the cached conversion path will tell osync_sink_engine_convert_to_dest to convert what is already vcard21 from xmlformat-contact to vcard21.
This segfault as the xmlformat assembler is not liking the plain vard21 as input.
Attached is a testcase (quite convoluted as it does not detect the issue in the order described above but the opposite . Ie the shared change is first and caching of the conversion path is done on first change which is the shared one. As the second entry_engine is to be written and will use the shared one conversion path (which tells the wrong conversion as corrupted by the previous members) I can detect that the second entry written to file is not in sync with its origin.
Attachments
Change History
Changed 2 years ago by prahal
-
attachment
testcase_for_sharedchange_multibuggyconversion.diff
added
Changed 2 years ago by prahal
-
attachment
fix_for_sharedchange_multibuggyconversion.diff
added
patch for osync_sink_engine_convert_to_dest
Changed 2 years ago by prahal
-
attachment
testdata_to_sync
added
tests/data/multisync_multiformats/data1/testdata_to_sync
Changed 2 years ago by prahal
-
attachment
testdata
added
tests/data/multisync_multiformats/data1/testdata
Changed 2 years ago by prahal
-
attachment
testdata.2
added
tests/data/multisync_multiformats/data2/testdata
Changed 2 years ago by prahal
-
attachment
testdata.3
added
tests/data/multisync_multiformats/data3/testdata

testcase