Displaying 20 results from an estimated 20 matches for "g_disable_assert".
2007 Mar 29
0
Branch 'as' - 9 commits - configure.ac doc/swfdec-sections.txt libswfdec/Makefile.am libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame.h libswfdec/swfdec_as_stack.c
...oto error;
}
if (spec->remove > 0) {
swfdec_as_stack_ensure_size (stack, spec->remove);
@@ -368,7 +372,7 @@ start:
swfdec_as_stack_ensure_left (stack, spec->add);
}
if (context->state != SWFDEC_AS_CONTEXT_RUNNING)
- break;
+ goto error;
#ifndef G_DISABLE_ASSERT
check = (spec->add >= 0 && spec->remove >= 0) ? stack->cur + spec->add - spec->remove : NULL;
#endif
@@ -393,7 +397,23 @@ start:
}
}
-internal_error:
+error:
return;
}
+void
+swfdec_as_context_return (SwfdecAsContext *context, SwfdecAsValue *retval...
2007 Oct 30
0
libswfdec/swfdec_button_movie.c
..., gboolean mouse_in, int button)
{
- SwfdecButtonCondition event;
+ int event;
int sound;
if (movie->mouse_in == mouse_in &&
@@ -173,14 +173,14 @@ swfdec_button_movie_change_mouse (SwfdecButtonMovie *movie, gboolean mouse_in, i
[(mouse_in ? 2 : 0) + button];
#ifndef G_DISABLE_ASSERT
- if (event == (guint) -1) {
+ if (event == -1) {
g_error ("Unhandled event for %s: %u => %u",
movie->button->menubutton ? "menu" : "button",
(movie->mouse_in ? 2 : 0) + movie->mouse_button,
(mouse_in ? 2 : 0) + button);
}
#endif
- if (...
2007 Aug 21
0
Branch 'vivi' - 10 commits - libswfdec/swfdec_button_movie.c libswfdec/swfdec_movie.c libswfdec/swfdec_player.c vivified/core vivified/dock vivified/ui
...d5b3c 100644
--- a/libswfdec/swfdec_button_movie.c
+++ b/libswfdec/swfdec_button_movie.c
@@ -171,7 +171,14 @@ swfdec_button_movie_change_mouse (Swfdec
[(movie->mouse_in ? 2 : 0) + movie->mouse_button]
[(mouse_in ? 2 : 0) + button];
- g_assert (event != (guint) -1);
+#ifndef G_DISABLE_ASSERT
+ if (event == (guint) -1) {
+ g_error ("Unhandled event for %s: %u => %u",
+ movie->button->menubutton ? "menu" : "button",
+ (movie->mouse_in ? 2 : 0) + movie->mouse_button,
+ (mouse_in ? 2 : 0) + button);
+ }
+#endif
if (event != 0) {
SWF...
2007 Mar 28
0
Branch 'as' - 3 commits - libswfdec/Makefile.am libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame.h libswfdec/swfdec_as_object.c libswfdec/swfdec_as_object.h libswfdec/swfdec_as_types.c
...sure_stack (cx, spec->remove)) {
+ }
+ if (spec->add > 0 &&
+ TRUE) { //fp->sp + spec->add - MAX (spec->remove, 0) > fp->spend) {
+ SWFDEC_ERROR ("FIXME: implement stack expansion, we got an overflow");
+ goto internal_error;
+ }
+#ifndef G_DISABLE_ASSERT
+ checksp = (spec->add >= 0 && spec->remove >= 0) ? fp->sp + spec->add - spec->remove : NULL;
+#endif
+#endif
+ spec->exec[version] (NULL, action, data, len);
+#if 0
+#ifndef G_DISABLE_ASSERT
+ if (checksp != NULL && checksp != fp->sp) {
+ /*...
2007 Mar 09
0
17 commits - libswfdec/js libswfdec/swfdec_js.c libswfdec/swfdec_js_global.c libswfdec/swfdec_js.h libswfdec/swfdec_js_movie.c libswfdec/swfdec_movie.c libswfdec/swfdec_player.c libswfdec/swfdec_player_internal.h libswfdec/swfdec_root_movie.c
...] = { "Try", NULL },
/* version 5 */
[0x94] = { "With", NULL },
@@ -2560,7 +2581,10 @@ swfdec_script_interpret (SwfdecScript *s
guint8 *startpc, *pc, *endpc, *nextpc;
JSBool ok = JS_TRUE;
void *mark;
- jsval *startsp, *endsp, *checksp;
+ jsval *startsp;
+#ifndef G_DISABLE_ASSERT
+ jsval *checksp;
+#endif
int stack_check;
guint action, len;
guint8 *data;
@@ -2636,8 +2660,8 @@ swfdec_script_interpret (SwfdecScript *s
goto out;
}
fp->spbase = startsp;
+ fp->spend = startsp + STACKSIZE;
fp->sp = startsp;
- endsp = startsp + STACKSIZE;
/* C...
2007 Apr 12
0
Branch 'as' - 15 commits - libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame.h libswfdec/swfdec_as_function.c libswfdec/swfdec_as_function.h libswfdec/swfdec_as_interpret.c
...on */
- action = *pc;
+ /* prepare action */
spec = swfdec_as_actions + action;
- if (action == 0)
- break;
if (action & 0x80) {
if (pc + 2 >= endpc) {
SWFDEC_ERROR ("action %u length value out of range", action);
@@ -445,6 +450,7 @@ start:
#ifndef G_DISABLE_ASSERT
check = (spec->add >= 0 && spec->remove >= 0) ? stack->cur + spec->add - spec->remove : NULL;
#endif
+ /* execute action */
spec->exec[version] (context, action, data, len);
if (frame == context->frame) {
#ifndef G_DISABLE_ASSERT
diff-tree 3c69...
2007 Aug 02
0
10 commits - libswfdec/compiler.c libswfdec-gtk/swfdec_source.c libswfdec/Makefile.am libswfdec/swfdec_player.c NEWS test/trace
...libswfdec/swfdec_player.c
@@ -641,18 +641,19 @@ swfdec_player_dispose (GObject *object)
/* we do this here so references to GC'd objects get freed */
G_OBJECT_CLASS (swfdec_player_parent_class)->dispose (object);
+ swfdec_player_remove_all_external_actions (player, player);
#ifndef G_DISABLE_ASSERT
{
SwfdecPlayerAction *action;
+ while ((action = swfdec_ring_buffer_pop (player->external_actions)) != NULL) {
+ g_assert (action->object == NULL); /* skip removed actions */
+ }
while ((action = swfdec_ring_buffer_pop (player->actions)) != NULL) {
g_assert (...
2007 Feb 06
0
Branch 'interpreter' - 15 commits - configure.ac libswfdec/swfdec_audio_event.c libswfdec/swfdec_button_movie.c libswfdec/swfdec_color.c libswfdec/swfdec_color.h libswfdec/swfdec_compiler.c libswfdec/swfdec_image.c libswfdec/swfdec_sprite_movie.c
...+++ b/libswfdec/swfdec_compiler.c
@@ -1310,6 +1310,9 @@ swfdec_compile (SwfdecPlayer *player, Sw
} else {
len = 0;
}
+ if (swfdec_bits_left (bits) < len * 8) {
+ compile_state_error (&state, "Not enough data available to parse next action");
+ }
#ifndef G_DISABLE_ASSERT
target = bits->ptr + len;
#endif
diff-tree 469f29442894cdea2116ac801501057266f28727 (from 93148116d47fcaaa7bb894dd73f8c35b555289f0)
Author: Benjamin Otte <otte@gnome.org>
Date: Tue Feb 6 09:48:07 2007 +0100
improve image test
- list failed tests like trace.c
- use...
2007 Apr 04
0
Branch 'as' - 4 commits - libswfdec/Makefile.am libswfdec/swfdec_as_context.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_interpret.h libswfdec/swfdec_as_object.c libswfdec/swfdec_as_types.c libswfdec/swfdec_as_types.h
...erpret action %3u 0x%02X %s for version %u", action,
+ action, spec->name ? spec->name : "Unknown", script->version);
+ /* FIXME: figure out what flash player does here */
goto error;
}
if (spec->remove > 0) {
@@ -422,7 +410,7 @@ start:
#ifndef G_DISABLE_ASSERT
check = (spec->add >= 0 && spec->remove >= 0) ? stack->cur + spec->add - spec->remove : NULL;
#endif
- spec->exec[version] (NULL, action, data, len);
+ spec->exec[version] (context, action, data, len);
if (frame == context->frame) {
#ifndef G_...
2007 Aug 17
0
Branch 'vivi' - 13 commits - libswfdec/swfdec_as_context.c libswfdec/swfdec_as_debugger.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_script_function.c test/trace vivified/core vivified/ui
...libswfdec/swfdec_as_context.c
+++ b/libswfdec/swfdec_as_context.c
@@ -682,6 +682,7 @@ swfdec_as_context_run (SwfdecAsContext *
SwfdecAsFrame *frame, *last_frame;
SwfdecScript *script;
const SwfdecActionSpec *spec;
+ SwfdecActionExec exec;
guint8 *startpc, *pc, *endpc, *nextpc;
#ifndef G_DISABLE_ASSERT
SwfdecAsValue *check;
@@ -813,12 +814,22 @@ start:
nextpc = pc + 1;
}
/* check action is valid */
- if (spec->exec[version] == NULL) {
- SWFDEC_WARNING ("cannot interpret action %3u 0x%02X %s for version %u, skipping it", action,
- action, spec->name ?...
2007 Sep 13
0
5 commits - libswfdec/Makefile.am libswfdec/swfdec_as_context.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame_internal.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_scope.c libswfdec/swfdec_as_scope.h libswfdec/swfdec_as_script_function.c
...FIXME: do this via flag? */
if (frame->pc == pc) {
frame->pc = pc = nextpc;
- check_scope = TRUE;
+ check_block = TRUE;
} else {
pc = frame->pc;
- check_scope = FALSE;
+ check_block = FALSE;
}
if (frame == context->frame) {
#ifndef G_DISABLE_ASSERT
diff --git a/libswfdec/swfdec_as_frame.c b/libswfdec/swfdec_as_frame.c
index 52745bd..5620ac7 100644
--- a/libswfdec/swfdec_as_frame.c
+++ b/libswfdec/swfdec_as_frame.c
@@ -195,8 +195,71 @@ swfdec_as_stack_iterator_next (SwfdecAsS
return iter->current;
}
+/*** BLOCK HANDLING ***/
-G_DEFI...
2007 Jun 05
0
Branch 'as' - 8 commits - libswfdec/Makefile.am libswfdec/swfdec_as_context.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_number.c libswfdec/swfdec_as_scope.h
...action = *pc;
@@ -508,8 +512,10 @@ start:
/* FIXME: do this via flag? */
if (frame->pc == pc) {
frame->pc = pc = nextpc;
+ check_scope = TRUE;
} else {
pc = frame->pc;
+ check_scope = FALSE;
}
if (frame == context->frame) {
#ifndef G_DISABLE_ASSERT
diff --git a/libswfdec/swfdec_as_frame.c b/libswfdec/swfdec_as_frame.c
index b36e1e4..de18973 100644
--- a/libswfdec/swfdec_as_frame.c
+++ b/libswfdec/swfdec_as_frame.c
@@ -122,7 +122,7 @@ swfdec_as_frame_new (SwfdecAsContext *co
SWFDEC_DEBUG ("new frame for function %s", frame->fun...
2007 Oct 25
0
6 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_event.c libswfdec/swfdec_event.h libswfdec/swfdec_movie.c libswfdec/swfdec_movie.h libswfdec/swfdec_player.c libswfdec/swfdec_player_internal.h libswfdec/swfdec_resource.c
...{
SwfdecPlayer *player = SWFDEC_PLAYER (object);
+ guint i;
swfdec_player_stop_all_sounds (player);
g_hash_table_destroy (player->registered_classes);
@@ -785,17 +827,24 @@ swfdec_player_dispose (GObject *object)
swfdec_player_remove_all_external_actions (player, player);
#ifndef G_DISABLE_ASSERT
{
- SwfdecPlayerAction *action;
+ SwfdecPlayerExternalAction *action;
while ((action = swfdec_ring_buffer_pop (player->external_actions)) != NULL) {
g_assert (action->object == NULL); /* skip removed actions */
}
- while ((action = swfdec_ring_buffer_pop (player-&...
2007 Feb 06
0
21 commits - configure.ac libswfdec/swfdec_audio_event.c libswfdec/swfdec_bits.c libswfdec/swfdec_button_movie.c libswfdec/swfdec_color.c libswfdec/swfdec_color.h libswfdec/swfdec_compiler.c libswfdec/swfdec_edittext.c libswfdec/swfdec_image.c
...+++ b/libswfdec/swfdec_compiler.c
@@ -1310,6 +1310,9 @@ swfdec_compile (SwfdecPlayer *player, Sw
} else {
len = 0;
}
+ if (swfdec_bits_left (bits) < len * 8) {
+ compile_state_error (&state, "Not enough data available to parse next action");
+ }
#ifndef G_DISABLE_ASSERT
target = bits->ptr + len;
#endif
diff-tree 469f29442894cdea2116ac801501057266f28727 (from 93148116d47fcaaa7bb894dd73f8c35b555289f0)
Author: Benjamin Otte <otte@gnome.org>
Date: Tue Feb 6 09:48:07 2007 +0100
improve image test
- list failed tests like trace.c
- use...
2007 Nov 07
0
14 commits - libswfdec/swfdec_as_context.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_interpret.h libswfdec/swfdec_net_stream.c libswfdec/swfdec_script.c libswfdec/swfdec_sprite_movie.c libswfdec/swfdec_tag.c libswfdec/swfdec_text_field_movie.c
...xt.c
+++ b/libswfdec/swfdec_as_context.c
@@ -762,14 +762,12 @@ swfdec_as_context_run (SwfdecAsContext *context)
SwfdecAsFrame *frame, *last_frame;
SwfdecScript *script;
const SwfdecActionSpec *spec;
- SwfdecActionExec exec;
const guint8 *startpc, *pc, *endpc, *nextpc, *exitpc;
#ifndef G_DISABLE_ASSERT
SwfdecAsValue *check;
#endif
guint action, len;
const guint8 *data;
- int version;
guint original_version;
void (* step) (SwfdecAsDebugger *debugger, SwfdecAsContext *context);
gboolean check_block; /* some opcodes avoid a scope check */
@@ -849,7 +847,6 @@ start:
g_assert (f...
2007 Jul 26
0
17 commits - doc/swfdec-sections.txt libswfdec/compiler.c libswfdec/.gitignore libswfdec/Makefile.am libswfdec/swfdec_asbroadcaster.c libswfdec/swfdec_as_context.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_object.h libswfdec/swfdec_as_strings.c
...add > 0)
swfdec_as_stack_ensure_free (context, spec->add);
}
- if (context->state != SWFDEC_AS_CONTEXT_RUNNING)
+ if (context->state != SWFDEC_AS_CONTEXT_RUNNING) {
+ SWFDEC_WARNING ("context not running anymore, aborting");
goto error;
+ }
#ifndef G_DISABLE_ASSERT
check = (spec->add >= 0 && spec->remove >= 0) ? context->cur + spec->add - spec->remove : NULL;
#endif
diff-tree bc30a8fb8c5ebfb708102e0eb9e7a0382f428c73 (from parents)
Merge: 0556e6c44af1b25585ab3a18f33470bfb5a469fd f1909bbdbc7a34c8f72909f7c29e24a0c1a78d33
Author...
2007 Dec 13
0
libswfdec-gtk/swfdec_gtk_player.c libswfdec/swfdec_as_date.c libswfdec/swfdec_audio.c libswfdec/swfdec_audio_event.c libswfdec/swfdec_button_movie.c libswfdec/swfdec_interval.c libswfdec/swfdec_key_as.c libswfdec/swfdec_mouse_as.c libswfdec/swfdec_movie.c
...ed_objects)
+ swfdec_player_unroot_object (player, priv->rooted_objects->data);
/* we do this here so references to GC'd objects get freed */
G_OBJECT_CLASS (swfdec_player_parent_class)->dispose (object);
@@ -856,43 +878,43 @@ swfdec_player_dispose (GObject *object)
#ifndef G_DISABLE_ASSERT
{
SwfdecPlayerExternalAction *action;
- while ((action = swfdec_ring_buffer_pop (player->external_actions)) != NULL) {
+ while ((action = swfdec_ring_buffer_pop (priv->external_actions)) != NULL) {
g_assert (action->object == NULL); /* skip removed actions */
}...
2007 Feb 06
0
109 commits - configure.ac libswfdec/js libswfdec/Makefile.am libswfdec/swfdec_bits.c libswfdec/swfdec_bits.h libswfdec/swfdec_buffer.c libswfdec/swfdec_button_movie.c libswfdec/swfdec_codec_screen.c libswfdec/swfdec_color.c libswfdec/swfdec_color.h
...**/
-JSScript *
-swfdec_compile (SwfdecPlayer *player, SwfdecBits *bits, int version, const char *name)
-{
- unsigned int action, len;
- const SwfdecActionSpec *current;
- CompileState state;
- JSScript *ret;
-#ifndef SWFDEC_DISABLE_DEBUG
- unsigned char *start = bits->ptr;
-#endif
-#ifndef G_DISABLE_ASSERT
- unsigned char *target;
-#endif
-//#define SWFDEC_DUMP_SCRIPTS
-#ifdef SWFDEC_DUMP_SCRIPTS
- SwfdecBits dump = *bits;
-#endif
-
- g_return_val_if_fail (SWFDEC_IS_PLAYER (player), NULL);
- g_return_val_if_fail (bits != NULL, NULL);
-
- if (name == NULL)
- name = "Unnamed script";...
2007 Aug 22
0
163 commits - autogen.sh configure.ac doc/swfdec-sections.txt libswfdec-gtk/swfdec_gtk_player.c libswfdec-gtk/swfdec_gtk_player.h libswfdec-gtk/swfdec_gtk_widget.c libswfdec-gtk/swfdec_source.c libswfdec/Makefile.am libswfdec/swfdec_as_array.c
...d5b3c 100644
--- a/libswfdec/swfdec_button_movie.c
+++ b/libswfdec/swfdec_button_movie.c
@@ -171,7 +171,14 @@ swfdec_button_movie_change_mouse (Swfdec
[(movie->mouse_in ? 2 : 0) + movie->mouse_button]
[(mouse_in ? 2 : 0) + button];
- g_assert (event != (guint) -1);
+#ifndef G_DISABLE_ASSERT
+ if (event == (guint) -1) {
+ g_error ("Unhandled event for %s: %u => %u",
+ movie->button->menubutton ? "menu" : "button",
+ (movie->mouse_in ? 2 : 0) + movie->mouse_button,
+ (mouse_in ? 2 : 0) + button);
+ }
+#endif
if (event != 0) {
SWF...
2007 Nov 28
0
59 commits - libswfdec-gtk/swfdec_gtk_widget.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_object.h libswfdec/swfdec_button.c libswfdec/swfdec_button.h libswfdec/swfdec_button_movie.c libswfdec/swfdec_button_movie.h libswfdec/swfdec_event.c
...e_in ? "IN" : "OUT", button ? "DOWN" : "UP",
- (mouse_in ? 2 : 0) + button);
- event = event_table[movie->button->menubutton ? 1 : 0]
- [(movie->mouse_in ? 2 : 0) + movie->mouse_button]
- [(mouse_in ? 2 : 0) + button];
-
-#ifndef G_DISABLE_ASSERT
- if (event == -1) {
- g_error ("Unhandled event for %s: %u => %u",
- movie->button->menubutton ? "menu" : "button",
- (movie->mouse_in ? 2 : 0) + movie->mouse_button,
- (mouse_in ? 2 : 0) + button);
- }
-#endif
- if (event >= 0) {
- SWFDEC_L...