Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Azure.Core depends on buggy version of System.Memory.Data #48448

Open
KalaKala123 opened this issue Feb 26, 2025 · 2 comments
Open

[BUG] Azure.Core depends on buggy version of System.Memory.Data #48448

KalaKala123 opened this issue Feb 26, 2025 · 2 comments
Assignees
Labels
Azure.Core Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. issue-addressed Workflow: The Azure SDK team believes it to be addressed and ready to close. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that

Comments

@KalaKala123
Copy link

Library name and version

Azure.Core 1.45.0

Describe the bug

Hi,
Azure.Core depends on System.Memory.Data >= 6.0.0 that has a bug in BinaryData.ToString().
When installing the latest version of Azure-relevant SDK such as Azure Storage blob SDK, that uses BinaryData type, it results in null reference exception.
The mitigation is explicitly installing a newer version of System.Memory.Data, that is not developer friendly.
Can you please upgrade the underlying version of System.Memory.Data to a newer version ?

BTW this is the bug in BinaryData.ToString that was fixed in newer versions
dotnet/runtime@a685d88

Expected behavior

Not getting null reference exception from BinaryData.ToString() when BinaryData is empty

Actual behavior

empty BinaryData throws null reference exception

Reproduction Steps

Install latest version of Azure.Core.
Then in your project write the following code:

var binaryData = new BinaryData(new byte[0]);

// throws Null ref exception
var x = binaryData.ToString()

Environment

No response

@github-actions github-actions bot added customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Feb 26, 2025
@jsquire jsquire self-assigned this Feb 26, 2025
@jsquire jsquire added Client This issue points to a problem in the data-plane of the library. Azure.Core labels Feb 26, 2025
@github-actions github-actions bot removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Feb 26, 2025
@jsquire
Copy link
Member

jsquire commented Feb 26, 2025

Hi @KalaKala123. Thanks for reaching out and we regret that you're experiencing difficulties. Each of the Azure SDK packages are currently based on the 6.x line of BCL dependency packages. Unfortunately, there is no 6.x version of System.Memory.Data with a fix for that bug, as the .NET team has decided against patching it.

Our dependencies are managed very deliberately, as we have a need to maintain compatibility across a wide variety of runtime environments, some of which have strict requirements. For example, Azure Functions and Azure PowerShell both have built-in package sets with versions we cannot exceed. We are in the process of migrating to the 8.x versions to align with the current LTS, which requires extensive testing and is not likely to hit until at least April, more likely May.

Though we cannot make an immediate bump, the version of System.Memory.Data referenced by the Azure SDK packages does not constrain the version that you're able to use. By taking a direct reference to System.Memory.Data in your application, the version used by all of your dependencies will be hoisted to match. For example, taking a direct reference on v9.0.1 in your application would cause that version to be used by Azure.Core and the other Azure SDK packages that your application references, as you're asking.

The efforts for migration are tracked by the following. Since there is no value in redundant tracking here as well, I'm going to mark this as addressed.

@jsquire jsquire added the issue-addressed Workflow: The Azure SDK team believes it to be addressed and ready to close. label Feb 26, 2025
Copy link

Hi @KalaKala123. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text "/unresolve" to remove the "issue-addressed" label and continue the conversation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Azure.Core Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. issue-addressed Workflow: The Azure SDK team believes it to be addressed and ready to close. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

No branches or pull requests

2 participants