Commit a6b96c0a authored by Geoff Simmons's avatar Geoff Simmons

Revert "Fix a panic caused by the .synth() method when the VMOD is built with -O0."

This reverts commit e632d8a6.

Reverts the workaround for #12
parent 5bdee1ab
......@@ -604,7 +604,8 @@ vmod_reader_get(VRT_CTX, struct VPFX(file_reader) *rdr)
VCL_VOID
vmod_reader_synth(VRT_CTX, struct VPFX(file_reader) *rdr)
{
VCL_BLOB blob;
const char *p[0];
struct strands strands = { 1, p };
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
CHECK_OBJ_NOTNULL(rdr, FILE_READER_MAGIC);
......@@ -621,9 +622,8 @@ vmod_reader_synth(VRT_CTX, struct VPFX(file_reader) *rdr)
AN(rdr->flags & RDR_MAPPED);
AN(rdr->addr);
blob = VRT_blob(ctx, "VMOD file synth()", rdr->addr, rdr->info->len - 1,
VMOD_FILE_BLOB_MAGIC);
VRT_synth_blob(ctx, blob);
strands.p[0] = rdr->addr;
VRT_synth_page(ctx, &strands);
AZ(pthread_rwlock_unlock(rdr->lock));
return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment