swftools-common
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Swftools-common] Segfault of as3compile on i386


From: Christian Welzel
Subject: [Swftools-common] Segfault of as3compile on i386
Date: Wed, 17 Oct 2012 12:19:41 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.7) Gecko/20120922 Icedove/10.0.7

Hi there,

I'm using as3compile from 0.9.2 to build swfupload for the debian repo.
Lately i got a bugreport that it segfaults on i386 architecture while
compiling.
This error does not occur on amd64 architecture.

This is, what the compiler says:
----
cd Flash && as3compile -M SWFUpload -T 9 -X 300 -Y 300 -r 15 SWFUpload.as -o
../tmp/swfupload.swf
SWFUpload.as:38:3: warning: function main uses forward or outer block
variable
references (SWFUpload): switching into compatibility mode
SWFUpload.as:925:3: warning: function GetFile uses forward or outer block
variable references (file): switching into compatibility mode
SWFUpload.as:1295:3: warning: function ReturnUploadStart uses forward or
outer
block variable references (message): switching into compatibility mode
SWFUpload.as:1406:3: warning: function BuildRequest uses forward or
outer block
variable references (key): switching into compatibility mode
Segmentation fault (core dumped)
make: *** [build] Error 139
----

Looking in the backtrace of gdb says:
----
Core was generated by `as3compile -M SWFUpload -T 9 -X 300 -Y 300 -r 15
SWFUpload.as -o ../tmp/swfuplo'.
Program terminated with signal 11, Segmentation fault.
#0  0x0809210f in dict_do_lookup (key=0xffbf3768, h=0x805d694) at q.c:1194
1194    q.c: No such file or directory.
(gdb) bt
#0  0x0809210f in dict_do_lookup (key=0xffbf3768, h=0x805d694) at q.c:1194
#1  dict_lookup (address@hidden, address@hidden) at q.c:1241
#2  0x0805e09d in registry_findmember (address@hidden,
address@hidden "", address@hidden "substr",
address@hidden '\001', address@hidden '\000')
at as3/registry.c:354
#3  0x0805e176 in registry_findmember_nsset (address@hidden,
ns=0x0, address@hidden "substr",
address@hidden '\001', address@hidden
'\000') at as3/registry.c:376
#4  0x08072104 in findmember_nsset (address@hidden,
name=0x9557f60 "substr", address@hidden '\001',
address@hidden '\000') at as3/parser_help.c:413
#5  0x08083dd9 in a3_parse () at parser.y:1969
#6  0x0806fcce in as3_parse_file_or_array (name=0x950eab0 "FileItem.as",
filename=0x94f8178
"/tmp/buildd/libjs-swfupload-2.2.0.1+ds1/Flash/FileItem.as",
address@hidden, address@hidden) at as3/compiler.c:115
#7  0x08070039 in as3_parse_list () at as3/compiler.c:179
#8  0x08070161 in as3_parse_file (filename=0xffbf5122 "SWFUpload.as") at
as3/compiler.c:211
#9  0x0804afd7 in main (argc=14, argv=0xffbf4534) at as3compile.c:233
----

It fails on some "substr" in file "FileItem.as".
I searched for it and there is only one "substr" in this file:
----
return "$" + ("0000" +
arguments[0].charCodeAt(0).toString(16)).substr(-4, 4);
----
Changing this to
----
var tmp: String = ("0000" + arguments[0].charCodeAt(0).toString(16));
return "$" + tmp.substr(-4, 4);
----
solves the segfault.

Line 1194 of lib/q.c is
----
unsigned int ohash = h->key_type->hash(key);
----

Is there a fix for this?


-- 
 MfG, Christian Welzel

  GPG-Key:     pub 4096R/5117E119 2011-09-19
  Fingerprint: 3688 337C 0D3E 3725 94EC  E401 8D52 CDE9 5117 E119



reply via email to

[Prev in Thread] Current Thread [Next in Thread]