You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Kalle Niemitalo (Jira)" <ji...@apache.org> on 2022/07/03 12:30:00 UTC
[jira] [Created] (AVRO-3569) C# infinite recursion in IConvertible.ToByte(System.IFormatProvider) of AvroDecimal
Kalle Niemitalo created AVRO-3569:
-------------------------------------
Summary: C# infinite recursion in IConvertible.ToByte(System.IFormatProvider) of AvroDecimal
Key: AVRO-3569
URL: https://issues.apache.org/jira/browse/AVRO-3569
Project: Apache Avro
Issue Type: Bug
Components: csharp, logical types
Affects Versions: 1.11.0
Environment: .NET SDK 6.0.301 on Windows 10 x64
Reporter: Kalle Niemitalo
h2. To reproduce
{code:C#}
using System;
using Avro;
class Program
{
static void Main()
{
Convert.ToByte(new AvroDecimal(0));
}
}
{code}
h2. Expected result
Convert.ToByte returns (byte)0, and the program does not output anything.
h2. Actual result
{noformat}
Stack overflow.
Repeat 13759 times:
--------------------------------
at Avro.AvroDecimal.System.IConvertible.ToByte(System.IFormatProvider)
at System.Convert.ToByte(System.Object, System.IFormatProvider)
--------------------------------
at Avro.AvroDecimal.System.IConvertible.ToByte(System.IFormatProvider)
at System.Convert.ToByte(System.Object)
at Program.Main()
{noformat}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)