Admin message

On Sunday, May 30th, we will be performing critical infrastructure maintenance on our Disaster Recovery processes between 20:30 and 00:30 EDT (00:30 and 2:30 UTC). This will necessitate brief outages for Community GitLab during that time. If you are not able to access one of our services or websites, please wait a few minutes and try again. Additional status updates will be available on our status page at https://status.opengroup.org/.

SDGenericDataset::readBlock(int blocknum, char **data, size_t &len) not correctly implemented in Azure backends

There is some descrepencies in how this function is implemented in the different backends.

https://community.opengroup.org/osdu/platform/domain-data-mgmt-services/seismic/seismic-dms-suite/seismic-store-cpp-lib/-/blob/master/src/src/lib/accessors/GcsAccessor.cc#L722

dictates that both data and len are out parameters. On function exit data will point to newly allocated buffer, and len will have the size of the buffer data.

This is implemented in a simmilar manner for AWS here:

https://community.opengroup.org/osdu/platform/domain-data-mgmt-services/seismic/seismic-dms-suite/seismic-store-cpp-lib/-/blob/master/src/src/lib/cloud/providers/aws/AwsStorage.cc#L453

However, the implementation in both Azure implementations seem to be broken:

https://community.opengroup.org/osdu/platform/domain-data-mgmt-services/seismic/seismic-dms-suite/seismic-store-cpp-lib/-/blob/master/src/src/lib/cloud/providers/azure/cpprest/AzureStorage.cc#L430

Seems to take the len as a max input parameter, and copy at most len or the objectSize. But it does not expose the objectSize if len > the objectSize.

https://community.opengroup.org/osdu/platform/domain-data-mgmt-services/seismic/seismic-dms-suite/seismic-store-cpp-lib/-/blob/master/src/src/lib/cloud/providers/azure/curl/AzureStorage.cc#L586

Dereferences the data pointer, which probably points to garbage if it is used according to the other apis. Also it doesn't expose the size of the object either.

For OpenVDS its convenient if this function would allocate a buffer, fill it with the object data en expose the object size through len.

Edited Jun 01, 2021 by Jørgen Lind
Assignee Loading
Time tracking Loading