Skip to content

Commit ad1628c

Browse files
committed
fixed oopses during merging
1 parent 67dabac commit ad1628c

File tree

6 files changed

+19
-4
lines changed

6 files changed

+19
-4
lines changed

block/block-backend.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -779,6 +779,8 @@ BlockBackend *blk_by_name(const char *name)
779779
return NULL;
780780
}
781781

782+
//// --- Begin LibAFL code ---
783+
///
782784
/*
783785
* Return the BlockBackend with name hash @name_hash if it exists, else null.
784786
*/
@@ -795,6 +797,8 @@ BlockBackend *blk_by_name_hash(guint name_hash)
795797
return NULL;
796798
}
797799

800+
//// --- End LibAFL code ---
801+
798802
/*
799803
* Return the BlockDriverState attached to @blk if any, else null.
800804
*/

gdbstub/user-target.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,10 +318,11 @@ void gdb_handle_query_rcmd(GArray *params, void *user_ctx)
318318
gdb_put_packet("");
319319
}
320320
}
321-
#endif
322321

323322
//// --- End LibAFL code ---
324323

324+
#endif
325+
325326
static const char *get_filename_param(GArray *params, int i)
326327
{
327328
const char *hex_filename = gdb_get_cmd_param(params, i)->data;

include/tcg/tcg-op.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,19 +53,27 @@ typedef TCGv_i32 TCGv;
5353
#define tcg_temp_new() tcg_temp_new_i32()
5454
#define tcg_global_mem_new tcg_global_mem_new_i32
5555
#define tcgv_tl_temp tcgv_i32_temp
56+
//// --- Begin LibAFL code ---
5657
#define temp_tcgv_tl temp_tcgv_i32
58+
//// --- End LibAFL code ---
5759
#define tcg_gen_qemu_ld_tl tcg_gen_qemu_ld_i32
5860
#define tcg_gen_qemu_st_tl tcg_gen_qemu_st_i32
61+
//// --- Begin LibAFL code ---
5962
#define tcg_gen_tl_ptr tcg_gen_ext_i32_ptr
63+
//// --- End LibAFL code ---
6064
#elif TARGET_LONG_BITS == 64
6165
typedef TCGv_i64 TCGv;
6266
#define tcg_temp_new() tcg_temp_new_i64()
6367
#define tcg_global_mem_new tcg_global_mem_new_i64
6468
#define tcgv_tl_temp tcgv_i64_temp
69+
//// --- Begin LibAFL code ---
6570
#define temp_tcgv_tl temp_tcgv_i64
71+
//// --- End LibAFL code ---
6672
#define tcg_gen_qemu_ld_tl tcg_gen_qemu_ld_i64
6773
#define tcg_gen_qemu_st_tl tcg_gen_qemu_st_i64
74+
//// --- Begin LibAFL code ---
6875
#define tcg_gen_tl_ptr tcg_gen_trunc_i64_ptr
76+
//// --- End LibAFL code ---
6977
#else
7078
#error Unhandled TARGET_LONG_BITS value
7179
#endif

meson.build

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3531,7 +3531,6 @@ endif
35313531
qom_ss = qom_ss.apply({})
35323532
libqom = static_library('qom', qom_ss.sources() + genh,
35333533
dependencies: [qom_ss.dependencies()],
3534-
name_suffix: 'fa',
35353534
pic: 'AS_SHARED_LIB' in config_host,
35363535
build_by_default: false)
35373536
qom = declare_dependency(objects: libqom.extract_all_objects(recursive: false),
@@ -3540,7 +3539,6 @@ qom = declare_dependency(objects: libqom.extract_all_objects(recursive: false),
35403539
event_loop_base = files('event-loop-base.c')
35413540
event_loop_base = static_library('event-loop-base',
35423541
sources: event_loop_base + genh,
3543-
name_suffix: 'fa',
35443542
build_by_default: false)
35453543
event_loop_base = declare_dependency(objects: event_loop_base.extract_all_objects(recursive: false),
35463544
dependencies: [qom])
@@ -3774,7 +3772,7 @@ if enable_modules
37743772
command: [modinfo_generate, '--devices', config_devices_mak, '@INPUT@'],
37753773
capture: true)
37763774

3777-
modinfo_lib = static_library('modinfo', modinfo_src, pic: 'AS_SHARED_LIB' in config_host)
3775+
modinfo_lib = static_library('modinfo-' + target + '.c', modinfo_src, pic: 'AS_SHARED_LIB' in config_host)
37783776
modinfo_dep = declare_dependency(link_with: modinfo_lib)
37793777

37803778
arch = config_target['TARGET_NAME'] == 'sparc64' ? 'sparc64' : config_target['TARGET_BASE_ARCH']

target/arm/machine.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -878,13 +878,17 @@ static int cpu_pre_save(void *opaque)
878878

879879
cpu->cpreg_vmstate_array_len = cpu->cpreg_array_len;
880880

881+
//// --- Begin LibAFL code ---
881882
// Some ARM cpus like Cortex M do not have coprocessors
882883
if (cpu->cpreg_array_len > 0) {
884+
//// --- End LibAFL code ---
883885
memcpy(cpu->cpreg_vmstate_indexes, cpu->cpreg_indexes,
884886
cpu->cpreg_array_len * sizeof(uint64_t));
885887
memcpy(cpu->cpreg_vmstate_values, cpu->cpreg_values,
886888
cpu->cpreg_array_len * sizeof(uint64_t));
889+
//// --- Begin LibAFL code ---
887890
}
891+
//// --- End LibAFL code ---
888892

889893
return 0;
890894
}

tests/vm/centos

Whitespace-only changes.

0 commit comments

Comments
 (0)