trouble shooting for arm64-gen.c

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

trouble shooting for arm64-gen.c

张炯
Hi guys,
I'm the fans to tinycc.
Today I compile the FFTW-3.3.8 by tcc. But it trigger the assert(0) in line 257 arm64-gen.c.
Then,I add "case VT_STRUCT: return 3;" int the tail of the switch block curtly.

I wonder to know whether it is correct?

Best Regards!

Jiong


 



 


_______________________________________________
Tinycc-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel
Reply | Threaded
Open this post in threaded view
|

Re: trouble shooting for arm64-gen.c

Christian Jullien-3

Thank you Jiong.

To help maintainers with this bug, here is a minimal test case which reproduces the error (on a Rpi3 with Fedrora 31):

 

jullien@rpi64 $ cat print.c

#include <stdarg.h>

 

struct X { int _x; };

 

void

va_arg_bug(va_list ap) {

        void *x = va_arg(ap, struct X *);

}

jullien@rpi64 $ tcc -c print.c

tcc: arm64-gen.c:257: arm64_type_size: Assertion `0' failed.

Aborted (core dumped)

 

From arm64_type_size, type VT_STRUCT is indeed missing.

 

I’m going to push a patch and add new test case.

 

C.

 

From: Tinycc-devel [mailto:tinycc-devel-bounces+eligis=[hidden email]] On Behalf Of ??
Sent: Sunday, March 22, 2020 00:51
To: [hidden email]
Subject: [Tinycc-devel] trouble shooting for arm64-gen.c

 

Hi guys,

I'm the fans to tinycc.

Today I compile the FFTW-3.3.8 by tcc. But it trigger the assert(0) in line 257 arm64-gen.c.

ThenI add "case VT_STRUCT: return 3;" int the tail of the switch block curtly.

 

I wonder to know whether it is correct?

 

Best Regards!

 

Jiong

 

 

 

 


_______________________________________________
Tinycc-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel
Reply | Threaded
Open this post in threaded view
|

Re: trouble shooting for arm64-gen.c

Michael Matz-4
Hi,

On Sun, 22 Mar 2020, Christian Jullien wrote:

>
> jullien@rpi64 $ cat print.c
>
> #include <stdarg.h>
>
>  
>
> struct X { int _x; };
>
>  
>
> void
>
> va_arg_bug(va_list ap) {
>
>         void *x = va_arg(ap, struct X *);
This is a pointer.

> jullien@rpi64 $ tcc -c print.c
>
> tcc: arm64-gen.c:257: arm64_type_size: Assertion `0' failed.
>
> Aborted (core dumped)
> From arm64_type_size, type VT_STRUCT is indeed missing.

So this can't be the fix directly, something else is going on (e.g.
something in TCC looks through the pointer to get at 'struct X' where that
either shouldn't happen, or where it needs to be handled more correct).


Ciao,
Michael.

>
>  
>
> I’m going to push a patch and add new test case.
>
>  
>
> C.
>
>  
>
> From: Tinycc-devel [mailto:tinycc-devel-bounces+eligis=[hidden email]]
> On Behalf Of ??
> Sent: Sunday, March 22, 2020 00:51
> To: [hidden email]
> Subject: [Tinycc-devel] trouble shooting for arm64-gen.c
>
>  
>
> Hi guys,
>
> I'm the fans to tinycc.
>
> Today I compile the FFTW-3.3.8 by tcc. But it trigger the assert(0) in line
> 257 arm64-gen.c.
>
> Then,I add "case VT_STRUCT: return 3;" int the tail of the switch block
> curtly.
>
>  
>
> I wonder to know whether it is correct?
>
>  
>
> Best Regards!
>
>  
>
> Jiong
>
>  
>
>  
>
>  
>
>  
>
>
>
_______________________________________________
Tinycc-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel