The return type of the original fh_arg_len() was signed, but it was guaranteed that the function never returned a negative value. Some parts of the code assumed so and compared values returned by ARGLEN() with values of unsigned types. The change seems to make sense and it silences a few compiler complaints.
Calling this a stack trace would be an overstatement, but it is helpful nevertheless.
Some tests of arrays were failing silently because of difference between length of two tested arrays. Now that we have a little state trace, it is easy to see which tests are failing, so instead of returning false it should first assert the length of two arrays is equal.
Do not lose sign from parameters in calls to slice().
New tests for Array#slice() and a fix in the tested function: if begin >= end, the slice will be empty.
I don't think it's necessary to duplicate the string. fh_error() will only print it, so unless strlen(s) is shorter than 14, it's fine to print it from 14th character onwards.
Free output_vector if it's not used.
Replace signed int with unsigned to avoid signed/unsigned integer comparison.
There's no need to sort an empty array. I also added a test for sorting such array.
Merge pull request #1 from 1500100900/master

Silence a few warnings, add a primitive stack trace, make assertArrayEquals() more accurate, fix Array#slice(), add some new tests.