elasticsearch/elasticsearch — pull request #7466 by jprante (2014-08-26 19:38:45+00:00)
Title: Add LZF safe encoder in LZFCompressor

Selecting the safe encoder fixes a 64bit JVM crash on big-endian architectures with
LZF UnsafeChunkEncoderBE.

Example of such a big-endian architecture is Solaris SPARC 64bit (another one is POWER).

Without safe encoder, LZF uses the unsafe encoder, and crashes when
for example this command is executed

PUT /_template/logstash
{
"template" : "logstash-*",
"settings" : {
"index.refresh_interval" : "5s"
},
"mappings" : {
"_default_" : {
"_all" : { "enabled" : true },
"dynamic_templates" : [ {
"string_fields" : {
"match" : "*",
"match_mapping_type" : "string",
"mapping" : {
"type" : "string",
"index" : "analyzed",
"omit_norms" : true,
"fields" : {
"raw" : {
"type": "string",
"index" : "not_analyzed",
"ignore_above" : 256
}
}
}
}
} ],
"properties" : {
"@version": { "type": "string", "index": "not_analyzed" },
"geoip" : {
"type" : "object",
"dynamic": true,
"path": "full",
"properties" : {
"location" : { "type" : "geo_point" }
}
}
}
}
}
}

A crash file is available at https://gist.github.com/jprante/79f4b4c0b9fd83eb1c9b